igrigorik / em-synchrony

Fiber aware EventMachine clients and convenience classes

Home Page:http://www.igvita.com/2010/03/22/untangling-evented-code-with-ruby-fibers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mongo patch seems outdated

rubencaro opened this issue · comments

Hi,

I was trying to make em-synchrony (from goliath) work with the 'official' mongo driver, and found out that the patch applied here https://github.com/igrigorik/em-synchrony/blob/master/lib/em-synchrony/mongo.rb was not working. I guess it was outdated, because there were even classes that were not there.

I got it working with the current last 1.x stable release (many changes for the upcoming 2.0... will need to remake the patch again soon). The patch I came up with is here https://github.com/rubencaro/mongo-em-patch/blob/master/lib/mongo-em-patch.rb

Maybe you want to adapt this patch for em-synchrony, or just fix the issue in some other way.

Also I did not test it much. As you can see, it was just to point an example of a goliath server with mongo through a fiber_connection_pool, so...

Cheers!