问题
I have a C application using the MySQL library for database access.
Is there a standard way to implement database connection pooling for such an application? The C connector doesn't appear to support it.
回答1:
The Zild Database Library, "a thread-safe high level multi-database connection pool library", looks very promising.
Previously I suggested that SQL Relay could be used to do this, amongst many other useful things, such as
- client-side caching
- load-balancing across database instances
- translating between different database access APIs
If the MySQL library is dynamically linked this can be done without recompiling the application.
When I last looked in 2009, the mailing list suggested SQL Relay might not be fully ready for production use, but that appears to have changed.
来源:https://stackoverflow.com/questions/1173197/is-there-a-standard-mysql-connection-pooling-library-for-c