New Ruby gem AmazeSNS

Hi all,

just a short note that I have released a new plugin on my github account:

http://github.com/cheeyeo/Amazon-SNS-Ruby

I’m still in the process of wrapping up into a gem once the spec tests are passed so please bear with me.

The plugin is designed to integrate with the Amazon Simple Notification Service which is similar to the Pusher service as rolled out by the cool guys at New Bamboo. You can design your next generation of Real Time Web apps using SNS.

For the ‘uninitiated’, RTW (Real Time Web) relies on HTML5 websockets which are bi-directional transport streams between the browser and your app, so the moment you make an update to your app, say added in a new blog post,it can notify all the clients who are designed to listen specifically to that particular event and update the blog page in real time.

Similarly, SNS supports push actions through a ‘publish’ action which enables subscribers to a particular ‘topic’ to receive messages via email or JSON through SMTP and http respectively. So far, I have only tried out the SMTP delivery option and sadly it does not support HTML messages at this point.

One cool feature of the plugin is the performance and scalability of it when I started developing it. Originally it only used a single HTTPClient object connection. After having caught the EventMachine bug and async IO operations I was curious about whether a EM version of it would really speed things up.

I added in EM and ran some benchmarks and here are the results below:

100 requests were made to SNS service backend. As you can see, each httpclient request averages 0.75 secs whereas with EM it only takes 0.27 secs! That is less than half and by using EM in conjunction with EventMachine::HttpRequest or the em-http gem, that also supports Deferrable module in EM which means higher concurrency and parallel requests.

This is my first attempt at writing a gem or plugin so your comments and feedback are welcome as it is not perfect by any means.

I also want to thank the following gem authors: Pusher and Happening, from which AmazeSNS borrows some of its ideas from.

Tagged with:
 

New Year Resolutions 2010

Happy New Year 2010

I’m not a firm believer of new year resolutions as I tend not to be able to keep them for some reason or other. But I thought for 2010 I might try a different approach and adopt some to keep myself occupied while waiting for my next gig.

The list below is by no way complete ( in fact, a simple app could be built to manage it??):

Write more regular blog posts

At least once or twice a week. May not have to be technical but at least topical

List of technologies to look out for:

2010 is going to be an exciting time for the development of Rails 3 but also in these areas I’m particularly
interested in: cloud computing; collaborative map-reduce problem solving; HTML 5; new schemaless databases

Keep more up to date than before

I tend to spend too much time on projects so the idea is to speed up development so I can have
more free time to myself to keep up to date with the latest and greatest as well as for my personal life.
This means rethinking on my current way of working and applying the 80-20 principle

Be Faster,Better,Stronger

No pun intended on the Daft Punk song but to be better and faster at what I can do

Also a big Thank You to all those who supported 29 Steps. All my best wishes to you for 2010.