Node.js and COMET

January 31, 2010

Today I started to study node.js, for these last days there was a lot of interesting posts about it.

So to begin understanding it, I setup to port two COMET based examples I did back when I started using twisted to do it.

Note that this may contain javascript misconceptions, as I’m not experienced with it and my js idiom is more geared towards python than proper js.

The first example is a basic comet server which prints a string to each connected user

simple comet

The other example sends the result of twitter searchs to all connected users:

twitter and comet

Node.JS presents a different toolset to solve the current problems we have. It used the excellent libev, among V8 and other cool stuff, and JS is a very modern and flexible language (at least more than I thought about it when trying to do web stuff).

Cheers

That’s not a replay from the last post. I’ve pushed into my github repo an initial, cleaned up version of RestMQ. This is special because it not only uses python and twisted, but cyclone, the twisted-based implementation of Tornado. Repo URL:  http://github.com/gleicon/restmq

Read the rest of this entry »

REST based message queue

November 22, 2009

I’ve been playing with lots of message queues lately, and with each of one, a protocol is favoured. There are modules for all protocols for a given MQ if you look further, but usually only one of them is more developed than others. That’s ok, because it’s hard to find willing people to help in open source projects.

Based on what I saw and used, a simple queue would suffice for most of cases. I tried Amazon SQS and the idea behind it is nice and simple. As I was looking to build a small “cloud-y” infra structure for my projects, I’ve started to build such queue using Google’s AppEngine. This was almost 1 year ago and just last week I found the original code, which immediatly I saw to clean, add API Keys and make it public.

Read the rest of this entry »