Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一些在 php 上实现的 Gearman 工作人员。这些工作人员的每个任务都应该在自己的事务中执行。为了让这些工作人员访问我的 MySQL 数据库,我需要一个连接池之类的东西。您能否为此提出一些建议(库、框架等)?谢谢
Client creates SQL statements Client passes SQL statements to mysql worker (in a batch or just one long string of statements) Worker performs the sql.
显然需要担心安全性,但实现应该很简单并且不需要库。
如果您知道您将拥有高级别的事务锁定,这可能会很好,因为作业可以在后台处理。