OT: PDXjs meeting on event-driven node.js, testing tools and Closure - Today, 7pm, Jive

1 view
Skip to first unread message

Igal Koshevoy

unread,
Jan 27, 2010, 2:20:57 PM1/27/10
to Portland Ruby Brigade
There's an interesting JavaScript Admirers meeting tonight. This is
particularly relevant because at the previous Ruby meeting, Jesse
presented EventMachine for Ruby and we had a long discussion on using
event-driven reactors to improve application performance and efficiency
while simplifying logic versus using a thread/process per worker. Also,
congratulations to Jesse and the group on their first anniversary of
admiring JavaScript. :)

-igal

Jesse Hallett wrote:
> Just a reminder that our next JavaScript meeting will be Wednesday
> night - tomorrow - at 7pm at Jive Software <http://calagator.org/>.
> The topics for this meeting are:
>
> * node.js - evented I/O for JavaScript on the server <http://nodejs.org/>
> * Google Closure Tools - everything you need to build a Google-class
> web app <http://code.google.com/closure/>
> * Testing asynchronous code with Screw.Unit and Blue Ridge
> <http://github.com/relevance/blue-ridge>
>
> Bring a laptop if you have one. This will be an activity night.
>
> There will be pizza, kindly provided by Jive Software. Plus we will
> have essentials on hand for celebrating the JavaScript Admirers' first
> birthday.

Erik Hollensbe

unread,
Jan 27, 2010, 3:47:34 PM1/27/10
to pdx...@googlegroups.com
At $job, I've been changing up our comet interface to get past the flash
system (juggernaut is unsurprisingly similar to our in-house code, and
that's related to who wrote it initially) we've been using here, using
the nginx_push service.

We use eventmachine on the server side to power this whole concoction
and a number of other messaging systems, such as launching new game
servers on other machines and relaying game allocation information back
to the user.

Anyhow, I came up with a little strategy to intertwine our push messages
and our rails app to provide a cohesive interface by effectively turning
the user's web browser into a 'controller', making the push server the
'model' and rails controllers the 'view'. The results in development
have been very encouraging and we should have this in production once
another project wraps up.

Basically, our event machine process delivers JSON to a publish endpoint
of the nginx comet implementation, which then pushes it to a subscribing
XHR client. The client then interprets those results and requests
another piece of data from the rails server which is then rendered in
the place the push message describes. This allows effective multiplexing
of push operations over a single subscriber, and doesn't require us to
write application code specific to our push implementation (we just
write it for our main rails site).

I've been given permission to create a presentation+demo for the
philly.rb guys (living here now, but still like having my ear on this
list), so I can share this.

The presentation isn't done yet, but here's some javascript to chew on:

http://gist.github.com/285854

You may also want to look at my patches for nginx_push, which make the
server CORS (cross-origin spec for HTTP, supported by everyone but
opera) compatible. The original maintainer says they're going to be
merged soon.

http://github.com/erikh/nginx_http_push_module

Anyways, I just blurted this out because it seemed like it'd be
interesting to people who found those topics interesting, as they seem
to be closely related. I'll blurt again when the demo's done.

-Erik

Reply all
Reply to author
Forward
0 new messages