bcg / em-mongo

EventMachine MongoDB Driver (based off of RMongo)
http://github.com/bcg/em-mongo
141 stars 47 forks source link

Remote Host support #20

Closed mrrooijen closed 13 years ago

mrrooijen commented 13 years ago

Any chance we'll be seeing remote host support in the near future so we can use services like MongoHQ?

whatupdave commented 13 years ago

+1

I didn't realise there wasn't any auth support so I have rewrite using the blocking mongo driver with EM.defer

bcg commented 13 years ago

Could you guys better define "Remote Host Support". Maybe I am missing something?

mrrooijen commented 13 years ago

@bcg like with Mongoid ODM you can specify an URI.

production:
  uri: <%= ENV["MONGOHQ_URL"] %>

To connect to the hosted (external/remote) database service.

bcg commented 13 years ago

You can connect to remote hosts in em-mongo ...

connection = EM::Mongo::Connection.new(IP_ADDR, PORT)

We don't have a YAML configuration file, but we also won't ever. This is just a library not a framework.

mrrooijen commented 13 years ago

I think the issue was (not sure if it still is) is the fact that using MongoHQ we are required to authenticate with a username and password in order to actually connect, and I believe at the time I submitted the ticket this wasn't possible. Been a while since I opened the ticket so I can't exactly remember.