react-gearman
react-gearman copied to clipboard
Add a ClientPool for distributing to multiple gearmand
- Add a class
ClientPool
(implementingClientInterface
); additional methods-
addClient($hostname, $port)
-
setDistributionStrategy($strategy)
-
getDistributionStrategy()
-
- Add a factory method
createClientPool($strategy = null)
The client-pool should chose a client at submission based by its strategy, e.g. random, workload-hash-based or just the first one. Actions such as setConnectionOption should forwarded to all clients. The actions should be robust against single Clients disconnecting/failing and move on accordingly,