Uh oh!
There was an error while loading. Please reload this page.
reconnection and thread safety - #7
Conversation
change md files for manishpatelUK change pom.xml for manishpatelUK Add thread safe QConnection Add tests for QSynchronizedConnection
maciejlach
commented
Jul 14, 2015
Thank you for the pull request. There are several points I would like to address:
It was a design decision not to include failover/reconnect logic into the basic library.
One has to consider how the failover/reconnect logic should be applied in case of asynchronous subscription (i.e. QCallbackConnection class). You can check out an alternative solution for basic synchronization and reconnection. |
manishpatelUK
commented
Jul 16, 2015
Hello Thanks
Fair enough. Makes following points moot, as I have a 1.8 requirement (eventually) but I'll address them anyway:
I didn't realise I had any aside from print stack traces... oversight.
Sync is devolved to a subclass. Reconnect should have been too, so that's fair enough.
Purposefully avoided that as this may well be used as a tickerplant feed, for which there may be multiple instances of the object. |
QBasicConnection reverted QRestorableConnection now has reconnection logic QSynchronizedConnection inherits from there Take out out.prints
I've made changes to pom. which can be ignored.
Everything else:
A QConnection that can now reconnect if the database has been restarted since the last open() call.
A thread safe QConnection class.
I have used this in production for an API backed by KDB, and works very well. The next step is to create connection pools in my API so that I can have lots of KDB instances in a cloud service; this branch was just the background work.