P2P using TCP & Ruby


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


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


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.


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

Machsend release – P2P file transfers inside the browser


After a private beta of Machsend, it’s now being released publicly – check it out.

Machsend lets you send files to people without any size restrictions. Files are sent in a P2P fashion, straight from one client to another – which means transfers are faster, and you don’t have to trust a third party with your data.

If you’re on the same LAN, files are sent directly. Otherwise a type of firewall traversal  allows the two clients connect (which works on about 80% of firewalls). There are few good papers that explain more here and here.

Machsend uses Yahoo! BrowserPlus to perform this TCP magic.

Data transfers are unlimited – I’ve sent gigabytes over the system without any trouble.

Machsend works on OSX and Windows. Unfortunately there isn’t a version of BrowserPlus for Linux yet, but one is being developed by www.tytseo.com.

There are a few more details on the ‘about‘ page.


Filed under: Machsend

An Entrepreneur’s Top 5 Practical Books


I find that a lot of business books I’ve read are far too high level to be useful, and although they might give you some indication of what’s to come ahead, they provide little advice on how to tackle problems or any nuances you should take into account.

There’s a reason why few practical business books have been written, and that’s because it’s a hard balancing keeping the content applicable and useful, without making it too case specific.

However, there are some out there. The following are list of books that fulfill the criteria of being both practical and useful. If you’ve got any favorites of your own, please suggest them in the comments.

1. The Entrepreneur’s Guide to Business Law

As an entrepreneur, you have to be pretty clued up on the legal side of things, to try and prevent making any fatal mistakes. In my opinion, this is one of the most valuable books in an entrepreneur’s arsenal and covers topics such as incorporation, intellectual property, venture capital and contract law.

Business Law

Filed under: Startup

Socialmod moderates Audi’s new site



Audi have launched a new site for the Goodwood Festival of Speed.

Along with photos and videos, Audi are interacting with their community by embedding a moderated Twitter feed into their site.

Any tweet with the hash tag #audifos is put on a Socialmod queue and, once moderated, is displayed on Audi’s site.

Audi at Goodwood

Filed under: Socialmod

Socialmod moderates BET.com Awards


bet logo

Last weekend was the BET Awards which over 5.8 million people tuned into.

BET ran a coordinated website to the awards, which they updated throughout the ceremony. They also had a ‘Wall of Tweets‘, showing all the Twitter commentary mentioning their awards, and tweets from selected artists and celebrities.

Socialmod did the moderation for all the ‘tweets’, preventing any libelous or objectionable content appearing on their website.

At one stage the top 9 trending topics on Twitter all referred to the BET Awards, so we had many thousands of tweets to process. Their moderators were working throughout the awards to try and get people’s tweets displayed as soon as possible.

We received about 1.3 million hits during the awards, so we had to provision a few more servers. However, our server setup is elastic, which means we easily scaled with the extra demand.

Wall of Tweets

celebrity tweets

Filed under: Socialmod

Machsend – P2P file sharing in the browser


Recently I’ve been developing a project called Machsend which enables P2P file transfers from inside the browser.


The process goes:

  • Bob navigates to the site, and drags files onto it
  • Bob then sends his uniquely generated link to Alice
  • Alice opens the link, can see Bob’s shared files, and downloads them

The file transfer is direct between users – it isn’t sent to any third party servers. This means it’s fast, and secure.

Files on the same network will transfer locally, greatly speeding up the process.

It also means there are no bandwidth bills to host the application, so it’ll be offered free, for unlimited size transfers (Machsend can transfer gigabytes without a problem).

Machsend is cross platform, and will work with about 85% of routers. It uses Yahoo BrowserPlus, which can be installed from within the browser, without a restart.

I’m looking for Beta Testers – so if you’re interested, please join the Google Group.

Filed under: Machsend

Creating a LLC – Getting your EIN


What is an EIN?

EIN stands for “Employer Identification Number”, but in reality it’s deals with a lot more than just employees.

It’s basically your companies identification number with the IRS.

Why do I need one?

You’ll need one to do almost anything with your company. Banks will require one, as will Merchant/Gateway accounts.

How to get an EIN if I’m a US Citizen

Although your incorporation company might offer to get you one (for a fee), you don’t need to go down that route.
Instead, you can apply free online at the IRS website.

How to get an EIN if I’m not a US Citizen

This is a bit more tricky as the online service only accepts US citizens.

You’ll need an ITIN (Individual Taxpayer Identification Number) which is a tax processing number for people without Social Security numbers. You should be able to get one in your countries US Embassy (check their website first). Take two forms of photo id (passport & driving license) and your incorporation documents. Once you’ve got an ITIN you can apply online for your EIN.

If you’re in a hurry, you can pay your incorporation company to get one for you. However, you’ll need to apply for an ITIN at some point, as you’ll need it when you file your personal tax return.

Filed under: Startup

Creating a LLC – Operating Agreement


In my last two posts, I explained corporation types and the initial incorporation.
However, once your company is incorporated, you need to get the members to sign the Operating Agreement.

I’ve “open sourced” our Operating Agreement (links at the end of the article).

The Operating Agreement is a legally binding contract between the members of the LLC. Although many states do not require LLCs to have an Operating Agreement, you should see it as a legal requirement (even if there’s only one member).

An Operating Agreement will give you credibility in court, and it’ll be harder to pierce the corporate veil (i.e. sue you personally) if you’ve got one in place. So essentially you need a Operating Agreement to protect your Limited Liability. It’s also for this reason that if you’re a single member LLC, it’s even more imperative that have a Operating Agreement as it may be that much harder to protect your Limited Liability.

Practically, an Operating Agreement is designed to get all the Members on the same page, and try to prevent disagreements later on down the line. If there are any problems, you and the courts will look to the Operating Agreement for guidance.

Filed under: Startup