Saturday, January 12, 2008

New Engine, New Features

A few months back I finally hit a wall enough with trying to add features to my original design of Mailinator. As with any piece of code - it had aged. I don't immediately impune such code as being bad or poorly designed, its just that code needs TLC every now and then -and- developers learn more and more about their domain as time goes on.

Anyway, a few months back I set out to do a full engine rewrite. Partially to redesign things to support some future features I want to do, but also to streamline the whole thing and fix a pile of bugs that had been floating around

One thing the old engine relied on a lot was Java Strings. And that would all be fine and dandy except that at the core, most servers are really about bytes, not Strings. Front ends are about strings, browsers are about Strings, but at the server, strings are just programmer abstractions for thinking about the data. The data itself is just bytes.

So the new engine is bytes.

I also did a lot of testing with how Java handles its networking. And how the 80-bazillion smtp servers out there send their data (and let me tell you, the RFCs which spell out the rules are most definitely just "guidelines" - those rules are broken all the time). I got pretty nitty-gritty and as I am wont to do when I'm writing code for fun, I wrote a ton of stuff from scratch.

Anyway - the good news is that the server can, according to my tests, handle about 1.5times the load it could before. I'm not really sure what the true abilities are as its hard to loadtest without a "real" few thousand machine hitting the server.

We're still running on one server (altho its beefed up a bit only because ServerBeach had some hard-to-pass-up deals) and I'm guessing it will scale easily to 30million emails a day. The max I've seen is 16million in one day and that was the old server code so I'm pretty conservative on the 30million (I expect the network to bottleneck before the server actually).

Hopefully, users won't really notice any of what I've mentioned so far - that is, hopefully mailinator will just work as great as before.

Things you will notice is that we have better language support - its seriously cool seeing all the Japanese and Russian spam fly by. It also supports encodings such as quoted-printable and base64 much better.

And finally.. I added a quickie feature that was suggested to me literally years ago. You can now access mailboxes right from your browser. Instead of going to www.mailinator.com and typing in your mailbox name into the form, just type:

http://yourboxname.mailinator.com

And it will web-a-port you right to that mailbox. Mailinator is about removing inertia from getting email - and this feature is just another feather in its cap.

1 comment:

Timothy Wee said...

did you use java's nio libraries?