Mongoid configuration needs to change to only hold configuration values, not the actual database and connection itself. The configuration should change and some changes to the format of the mongoid.yml can be done as well. This can then allow the connection to be created lazily and on the current thread instead of on configuration time.
- Refactor out enviroment and options from config
- Rewrite the database and replica set classes to only hold settings
- Rewrite all config specs
- Thread locals store connections, dbs, and collections.
- Allow database switching at runtime
- Allow master/slave sending on a per global/model/query basis.
- Redesign mongoid.yml schema.
- Allow multiple connections to different servers/dbs at the same time.
- Make sure reconnecting handles multiple databases.
- Make sure all config options can be passed to all database types.
- Remove the Mongoid collection and cursor wrapping, move single doc yield and factory creating up to criteria along with connection retrys.