-
Notifications
You must be signed in to change notification settings - Fork 69
Description
This project should support handling multiple MySQL client connections using a single client instance (connection pool). This allows sending multiple queries at once over independent connections. As such, a slow query on one connection would no longer block other queries. Here's what this could look like:
Coming soon: @reactphp with built-in connection pool to support concurrent database queries? 🔥 #async #php
– https://twitter.com/another_clue/status/1419633478216388612
I've filed #147 a while ago to discuss a simpler MysqlClient
API that could be good starting point to build on top of. This appears to be preferable to implementing this as a decorator around the existing (lazy) connection.
However, certain use cases could challenge this abstraction, specifically when dealing with transactions that should not span multiple independent connections by default. Other projects solve this by providing explicit control over handling underlying connections for these use cases, see e.g. https://github.com/mysqljs/mysql#pooling-connections.
Refs existing PRs #27, #148, #172, https://github.com/szado/reactphp-connection-pool and others (ping @dshemin, @skydiablo, @wpjscc, @szado)
Probably builds on top of #147, #87 and others
We welcome contributions, reach out if you want to support this project or become a sponsor ❤️