4 ms·
Just make sure this logic doesn't leak out and pollute your whole codebase. Otherwise you will have that whole hairy mess of opening multiple async connections
by swanson 14y ago
Just make sure this logic doesn't leak out and pollute your whole codebase. Otherwise you will have that whole hairy mess of opening multiple async connections with auto-retries right in the middle of your business logic. Want to send a Shoutt? Well first, you need to new up a connection pool and setup the exponential back-off strategy...
You should probably consider hiding all of that complexity behind an intention-revealing interface. Something like ConnectionManager - it will manage all the hairy connection internals and let you write cleaner code as your extend your app.
Software Design is hard. :)