Add Concurrency Support to CRS Authority
Description
Environment
Attachments
Type | Key | Summary | Priority | Story Points | Assignee | Status |
---|---|---|---|---|---|---|
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned | ||||||
Unassigned Unassigned |
Activity
CodeHaus Comment From: jgarnett - Time: Tue, 11 Oct 2011 19:35:31 -0500
---------------------
I have with drawn this change proposal and patch as its time has passed due to lack of review while the work was funded.
CodeHaus Comment From: jgarnett - Time: Mon, 31 May 2010 08:52:02 -0500
---------------------
Review geot-1286.patch it allows the mediator/delegate combo to use your new database in a jar. Basically catches us up to the point where we can run the code and see what is working or not.
CodeHaus Comment From: jgarnett - Time: Mon, 31 May 2010 08:50:06 -0500
---------------------
Attach patch isolates database connection/creation so it can be used by all implementations
CodeHaus Comment From: desruisseaux - Time: Tue, 17 Mar 2009 15:39:30 -0500
---------------------
Code review and rewrite done in geotidy.
CodeHaus Comment From: jgarnett - Time: Wed, 5 Mar 2008 16:26:16 -0600
---------------------
I will assign this bug to you for now then.
Please see http://docs.codehaus.org/display/GEOTOOLS/Improve+CRSAuthority+Concurrency+Caching+and+Connection+Use - http://docs.codehaus.org/display/GEOTOOLS/Improve+CRSAuthority+Concurrency+Caching+and+Connection+Use for the design under discussion.
In a high-volume environment, geotools does not perform well. This request is to improve the CRS Authority Factories so we can attack them with many many concurrent users and live to tell the tale. We also need to ensure that desktop and scientific applications do not suffer a significant performance hit as a result of this change. The current implementation has a caching technique, and this must be maintained and shown to work as well.
For the sake of discussion we will look at a concrete example, FactoryOnOracleSQL/FactoryUsingOracleSQL (located in /unsupported/epsg-oracle and /library/referencing).
http://docs.codehaus.org/display/GEOTOOLS/CRS+Authority+Allowing+Multiple+Users - Allowing Multiple Users
1. <img class="emoticon" src="https://jira.codehaus.org/images/icons/emoticons/star_yellow.gif" height="16" width="16" align="absmiddle" alt="" border="0"/> Use an ObjectPool of workers (ie FactoryUsingOracleSQL)
2. Make FactoryUsingOracleSQL Threadsafe
3. Use Fire and Forget Worker Factory
http://docs.codehaus.org/display/GEOTOOLS/CRS+Authority+Cache+Handling - Cache Handling:
4. Minimalize Connection Use Time
5. Hack Cache to Package Visibility
6. Worker Factory per Thread
7. <img class="emoticon" src="https://jira.codehaus.org/images/icons/emoticons/star_yellow.gif" height="16" width="16" align="absmiddle" alt="" border="0"/> Isolate Cache into a Separate Object and Inject
8. Seperate out responsibilities so "worker" just provides Definition and does not need the cache
http://docs.codehaus.org/display/GEOTOOLS/CRS+Authority+Connection+Use - Connection use:
9. <img class="emoticon" src="https://jira.codehaus.org/images/icons/emoticons/star_yellow.gif" height="16" width="16" align="absmiddle" alt="" border="0"/> Use ObjectPool lifecycle methods
10. Swap out Connection for DataSource
11. Use ConnectionPolicy Stratagy Object
The above solutions have been packaged up as four alternatives on this page:
http://docs.codehaus.org/display/GEOTOOLS/CRS+Authorty+Alternative+Proposals - http://docs.codehaus.org/display/GEOTOOLS/CRS+Authorty+Alternative+Proposals
http://docs.codehaus.org/display/GEOTOOLS/CRS+Authorty+Alternative+Proposals#CRSAuthortyAlternativeProposals-WorkerPool - Worker Pool
-Threads: Use ObjectPool to manage multiple workers
Cache: Isolate cache into seperate object, and inject into workers so they can perform their own cache check
* Connection: Use ObjectPool lifecycle methods to close connection, tune ObjectPool within limts of provided DataSource
http://docs.codehaus.org/display/GEOTOOLS/CRS+Authorty+Alternative+Proposals#CRSAuthortyAlternativeProposals-FireandForget - Fire and Forget
Threads: Create a FactoryUsingOracleSQL as needed in a "Fire and Forget" manner
* Cache: Workers can keep a back pointer, and call the parent to check the cache
* Connection : Workers must limit connection use to <b>just</b> the duration of the executeStatement
http://docs.codehaus.org/display/GEOTOOLS/CRS+Authorty+Alternative+Proposals#CRSAuthortyAlternativeProposals-WorkerDAOPool - Worker DAO Pool
Threads : Use ObjectPool to manage multiple workers
* Cache : Limit cache use to OracleEPSGAuthority, limit the scope of workers to only providing the <b>definition</b> (not object creation)
* Connection: Use ObjectPool lifecycle methods to close connection, tune ObjectPool within limits of provided DataSource
http://docs.codehaus.org/display/GEOTOOLS/CRS+Authorty+Alternative+Proposals#CRSAuthortyAlternativeProposals-JustdoIt - Just do it:
Threads: Create a Collection of Workers and manage it ourselves, keeping track of the Thread so we recursively use the same worker
* Cache: Workers can keep a back pointer, and call the parent to check the cache
* Connection: Choose a <b>connection policy</b> strategy object based on a new Hint