[CXX-336] Remove Connection Pool Created: 10/Sep/14  Updated: 22/Dec/14  Resolved: 03/Oct/14

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: legacy-1.0.0-rc0
Fix Version/s: legacy-1.0.0-rc1

Type: Task Priority: Blocker - P1
Reporter: Tyler Brock Assignee: Adam Midvidy
Resolution: Done Votes: 0
Labels: legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CXX-356 Remove the PeriodicTaskRunner from th... Closed
is depended on by CXX-316 Handle MongoDB connection string form... Closed
Related

 Description   

Remove the connection pooling mechanism from the C++ driver completely. It is not needed to have a working driver as currently specced.



 Comments   
Comment by Andrew Morrow (Inactive) [ 01/Dec/14 ]

pieterwjordaanpc@gmail.com That is great. Looking forward to seeing your work. If you find blocking issues please file tickets and we will do our best to make sure that the driver accommodates your needs.

Comment by Pieter Jordaan [ 01/Dec/14 ]

Thanks Andrew. I've started a github project for a basic pool. Will make contact when it is working and tested. https://github.com/Climax777/mongo-cxx-pool

Comment by Andrew Morrow (Inactive) [ 01/Dec/14 ]

At this time, we have no plans to add pooling back into the legacy driver for the upcoming 1.0 release. It should be very straightforward to implement a simple pool for your application, and you will have one that does exactly what you want.

If we find that there are limitations which prevent users from correctly implementing pooling for themselves, we will address those deficiencies in subsequent minor version releases.

Comment by Pieter Jordaan [ 30/Nov/14 ]

I just need a basic pool to reuse idle connections or open new ones if contention exists (up to a maximum). Removing idle connections after a long time.

Actually, the previous implementation was fine for my use case.

Most of the other drivers have a pool built in to the basic connection class. I assumed the same was happening with ScopedDBConnection.

Is there a plan to implement a default pool sans the technical issues you mentioned?

Looking at the pseudo code for the pool implementation mongodb provides for driver developers it seems some internal properties may be needed. So I am unsure if driver users will want to implement their own.

Comment by Andrew Morrow (Inactive) [ 30/Nov/14 ]

Hi pieterwjordaanpc@gmail.com -

The intention is that users of the driver should build their own pooling in a way that is appropriate for the current application. Pool policy is too tied to application needs for a one-size-fits-all approach. Given that, and the presence of some serious technical deficiencies with the old pool implementation inherited from the server codebase, we opted to remove the existing pool rather than offer a poor implementation.

We are happy to work with you to design a pool appropriate to the needs of your application.

Thanks,
Andrew

Comment by Pieter Jordaan [ 30/Nov/14 ]

Hi

How would you use pooling now with this change? It is imperative to be able to have a form of a pool for concurrent use of the driver without having to open a new connection every time.

Comment by Githook User [ 03/Oct/14 ]

Author:

{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}

Message: CXX-336 remove connection pool and associated cruft
Branch: legacy
https://github.com/mongodb/mongo-cxx-driver/commit/6fb1d7fbc00b73604126f769b3d329e31c3d2138

Comment by Adam Midvidy [ 26/Sep/14 ]

https://github.com/mongodb/mongo-cxx-driver/pull/167

Generated at Wed Feb 07 21:58:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.