MongoDB Ruby Driver Improvements
An intro to the latest MongoDB Ruby driver, featuring:
-
normal (
Connection) and replica-set aware connections (ReplSetConnection)The ReplSetConnection class is brand new. It has a slightly different API and must be used when connecting to a replica set. To connect, initialize the ReplSetConnection with a set of seed nodes followed by any connection options.
-
allowing reads from slave nodes
For certain read-heavy applications, it’s useful to distribute the read load to a number of slave nodes, and the driver now facilitates this.
With
:read_secondary => true, the connection will send all reads to an arbitrary secondary node. -
default setting for safe mode on Connection, DB, and Collection.
-
support for JRuby where it uses a Java based implementation of the BSON library
Original title and link: MongoDB Ruby Driver Improvements (NoSQL databases © myNoSQL)
via: http://blog.mongodb.org/post/2844804263/the-state-of-mongodb-and-ruby