faye

More Node.js + Comet Tomfoolery

Wednesday, April 28th, 2010 | code, development, javascript, nerdery, node.js | 2 Comments

I know there have been quite a few people out there that have messed around with node and comet already, but I figured I’d give it a go perhaps if only to familiarize myself more with the awesomeness that is node.js. I was originally inspired by this post on Ajaxian, so you’ll notice that I too am basing this off of Faye’s implementation of the Bayeux protocol for publish/subscribe. Only real difference is that in my example, messages are passed to the client via stdin.

Here’s the code: http://github.com/eculver/node_comet

I also read in a few other places where people were using fs.watchFile or node’s process.createChildProcess to create a public activity log of sorts. Maybe I’m just a nerd, but it would be kind of cool to go to a high-trafficked site and see some of the server log data (origin, user-agent, etc) in real-time. Something to that effect.

Tags: , ,