Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-1292

Config Refactor and Lazy, Thread-Safe Connections

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.0.0
    • Affects Version/s: None
    • Component/s: None

      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.

      This would be a combination of pulling in MONGOID-857, and addresses MONGOID-1167, MONGOID-1247, MONGOID-1004, MONGOID-911, MONGOID-637, MONGOID-1158, MONGOID-457.

      Tasks:

      • 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.

            Assignee:
            durran Durran Jordan
            Reporter:
            durran Durran Jordan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: