-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reconnection and thread safety #7
base: master
Are you sure you want to change the base?
Conversation
change md files for manishpatelUK change pom.xml for manishpatelUK Add thread safe QConnection Add tests for QSynchronizedConnection
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. |
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.