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

Always relay messages in batches #284

merged 1 commit into from Oct 6, 2019


Copy link

commented Oct 2, 2019

We want to minimise the number of connections to other SS, so instead of relaying messages individually, we accumulate them in a buffer, processing it periodically (every 200ms).

@msgmaxim msgmaxim requested review from sachaaaaa and BeaudanBrown Oct 2, 2019
Copy link

left a comment

Question but otherwise makes sense

void ServiceNode::relay_buffered_messages() {

// Should we wait for the response first?
constexpr std::chrono::milliseconds RELAY_INTERVAL = 500ms;

This comment has been minimized.

Copy link

BeaudanBrown Oct 6, 2019


2 differently scoped definitions of RELAY_INTERVAL for 200ms and 500ms
Should we just define in larger scope once or just make these the same? Or is the 500ms deliberate because it includes the actual relaying?

This comment has been minimized.

Copy link

msgmaxim Oct 6, 2019

Author Collaborator

Not deliberate, let's use 350ms for both as the average :)

@msgmaxim msgmaxim force-pushed the msgmaxim:batch-all branch from ce63c08 to 84190cc Oct 6, 2019
@msgmaxim msgmaxim force-pushed the msgmaxim:batch-all branch from 84190cc to f131c34 Oct 6, 2019
@msgmaxim msgmaxim merged commit 6a48312 into loki-project:dev Oct 6, 2019
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
@msgmaxim msgmaxim deleted the msgmaxim:batch-all branch Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.