Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-308

Pooling Connections independently of the User

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      In the current connection pooling approach, connections are pooled by database+user. As a result, it is not possible to share connections across multiple users.

      Take the following settings for instance: a huge number (1000 and more) of components (bundles) are in an OSGI container. They all use the same MongoDB cluster but different
      DBs. It makes sense to maintain central pool of connections (say 200 connections) instead of having these clients maintaining each a pool of connections. If each client maintains 10 connections, we end up having 10000 connections; a huge waste of resources. I thought something working alone the following lines would be great.

      Whenever a client wants to access the DB, it would:
      1) Get a connection from the common pool
      2) Before passing the connection to the client, the pool manager would switch the database to the client's DB, and
      3) Re-authenticate the connection with the new client's credentials.

      Does this make sense?
      I can see this

      Attachments

        Activity

          People

            antoine Antoine Girbal
            max.bridgewater Max Bridgewater
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: