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

Resume merge and fix #20

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Resume merge and fix #20

wants to merge 10 commits into from

Conversation

lipp
Copy link
Owner

@lipp lipp commented Dec 5, 2013

No description provided.

@lipp
Copy link
Owner Author

lipp commented Jan 7, 2014

@markert @mloy @gatzka : review would be nice, since pretty hard to test. For resume "playground" see here

@mloy
Copy link
Contributor

mloy commented Jan 10, 2014

Your test does work fine. Unfortunately several other processes on the executing machine might rely on the loopback device.

How about starting a private jetd on another port instead. Then connect the peer to that jetd, kill that jetd and restart it.

@mloy
Copy link
Contributor

mloy commented Jan 10, 2014

I do have one question,

in order to be able to replay all changes until reconnecting to jetd/peer, the peer and jetd keep a ring buffer of the messages to be send. How do both know, that the message was send succesfully and can be removed from that ring buffer?

@lipp
Copy link
Owner Author

lipp commented Jan 10, 2014

@mloy : "How about starting a private jetd on another port instead. Then connect the peer to that jetd, kill that jetd and restart it."
Killing jetd instead of shutting down the interface won't work, since the jetd also buffers messages etc. You cannot resume a connection after jetd closed.

@lipp
Copy link
Owner Author

lipp commented Jan 10, 2014

@mloy : "How do both know, that the message was send succesfully and can be removed from that ring buffer?"
Both jetd and peer exchange the number of received / send message in the "config.resume" request/response. Both sides must resend eventually missed messages to the other party. The messages are dropped when new ones are send. So once started, the history buffer will grow to the max history size (which is 100 right now) and afterwards each send will drop the first message(s) and append the new ones at the end.

@mloy
Copy link
Contributor

mloy commented Jan 10, 2014

ok, if in normal operation (without loss of connection), we will use up the whole ring buffer and simply overwrite the oldest one.

@mloy
Copy link
Contributor

mloy commented Jan 10, 2014

concerning your test: I thought, the peer resumes against a new started jetd. Which should be possible too.

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

Successfully merging this pull request may close these issues.

2 participants