P2P using TCP & Ruby

31
Aug
10

This is going to be a fairly technical post about the technologies behind Machsend and using P2P over TCP rather than UDP. I’v written a lot of context to the problem, so if you want to skip to the juicy protocol details look for the set of bullet points.

We recently launched Machsend, which enables people to send unlimited amounts of data from inside the browser. You literally drag a file onto the site, send the recipient a link, and they can download it straight away. Machsend uses TCP P2P connections to transfer data between clients.

Filed under: Machsend

Bowline Roadmap – Call for contributors

30
Aug
3

I’ve been fairly overwhelmed in the amount of coverage my last post on Bowline got, more than 10,000 hits and in the top 50 Delicious links for the day – it’s great to see the Ruby community’s support for building desktop applications. This post is just to put out a brief roadmap and show any potential contributers how to get involved.

Currently I’m working on getting Ruby Threads working, Bowline would be a bit useless if it locked up every time you called out to Ruby. This involves upgrading upgrading Titanium’s Ruby version to 1.9, and using a rather obscure API for blocking the threads when Titanium calls Ruby (since Ruby isn’t thread safe). You can find the ticket here – if you’ve any experience with C++ please feel free to weigh in and help. This is the one major bottleneck to Bowline development – once it’s resolved we can get on with more interesting things.

I’m also working on closing the tickets – most of them to do with Windows support. At the moment I don’t have a Windows environment, just Linux and OSX – so more testers are welcomed.

I’ll be writing more documentation, tutorials, and a website. You can also expect a “twitter client in 5 minutes” screencast.

I’ve started up a Google Group for Bowline development here. This is one of the best times to contribute since the project is fairly young and can accommodate API changes without  any issues.

Filed under: Bowline

Bowline – A Ruby GUI framework

4
Aug
53

Recently I’ve been working on a Ruby GUI framework called Bowline.

In a nutshell, Bowline lets you build cross platform desktop applications with Ruby, HTML and JavaScript. The idea is to make building desktop apps as simple (and fun) as building Rails websites.

Bowline is built on top of Titanium, a desktop SDK which essentially provides a Webkit window (and loads of useful APIs). The fact that Titanium uses Webkit (and a fairly edge version at that) means that you can take advantage of all those nice CSS3 and HTML5 features, and you can design for one browser.

On top of Titanium, Bowline provides:

  • A way of binding up Ruby and HTML
  • MVC development
  • Helpers, Models etc
  • Gem packaging
  • Generators, console & more

In a desktop app you don’t have the request/response cycle that web frameworks, like Rails, are built around. So, to replace that, Bowline has the idea of ‘Binders’ – Ruby classes that you can bind HTML to – so when the Ruby class changes, the HTML automatically updates.

Additionally I’ve ported the beautiful Aristo theme to CSS3, you can find it on Github here.

Using Titanium’s Developer tool, you can package your applications up for all three OSes, it’ll be sent up to the cloud and built.

Titanium

The rule is show, don’t tell – so here’s a basic Twitter client I’ve written with Bowline. Download the app (OSX only at the moment) here.

Twitter clients are truly the new ‘Hello World’.

Bowline Twitter

It’s early days for both Bowline and Titanium, but progress is quick and I hope we’ll have a fully fledged desktop framework soon.

Filed under: Bowline