Skip to content
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

QUESTION: Recovery from outages #144

Closed
IanWorthington opened this issue Feb 28, 2018 · 7 comments
Closed

QUESTION: Recovery from outages #144

IanWorthington opened this issue Feb 28, 2018 · 7 comments

Comments

@IanWorthington
Copy link

Hi Tim --

Interesting project. I've been unable to work out if it recovers fully from a loss of connection though.

For example if it places a buy order which, during an outage, fills, and I would like that fill to trigger the placement of specific sell orders, will all that happen automatically on a restart or reconnection, or is manual intervention required?

(NB Can't see how to TAG this question, sorry)

@douggie
Copy link
Collaborator

douggie commented Feb 28, 2018 via email

@IanWorthington
Copy link
Author

Thanks Douggie --

Not quite sure what you mean by:

main the order state within your application.

@douggie
Copy link
Collaborator

douggie commented Feb 28, 2018 via email

@IanWorthington
Copy link
Author

Hi Douggie --

So, if I understand you correctly after a disconnect I simply need code to pull down the new order status?

@douggie
Copy link
Collaborator

douggie commented Mar 5, 2018 via email

@douggie
Copy link
Collaborator

douggie commented Mar 16, 2018

Hi Ian,

Sorry this got mixed up an exchange thread.

Cointrader maintains all the order state for you and reconnects and determines the latest state. If cointrader fails, it recovers the state from the DB then connects to each exchange and reconciles the latest order state for you at start up.
There are also some JMX commands that allow you to create manual fill and order operations at runtime in the event something goes seriously wrong.

For performance the DB is persisted as a lazy write via a blocking queue, this queue is not durable so if you had a tonne of messages and a slow DB, this queue would back up, if you then restarted coin trader the state of stuff that was in the queue would be lost, in reality I have not see this happen.

@IanWorthington
Copy link
Author

Thanks Douggie.

@douggie douggie closed this as completed Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants