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

Event driven connections with message passing #81

Merged
merged 13 commits into from
Oct 17, 2023

Conversation

mycognosist
Copy link
Owner

This PR introduces a major refactor of the TCP connection life-cycle handling.

Connection data (including the TCP stream) is now passed to the connection manager and each phase of the cycle is handled there. This deviates from the previous approach where data was passed between various methods and the connection manager was mostly playing the role of registering connections and logging the steps. The connection life-cycle should now be easier to follow.

The refactor was prompted by my early explorations into adding EBT support. I soon realised that I needed to be able to take ownership of the stream in order to run an EBT loop.

Replication has been successfully tested between two solar instances and a solar and Patchwork instance.

@mycognosist mycognosist added the refactor Code rewrite for clarity or performance label Oct 17, 2023
@mycognosist
Copy link
Owner Author

Note: the build currently fails because I have temporarily changed the kuska-ssb dependency to a local path. This is because I had to commit changes to kuska-handshake and am awaiting a PR merge (Kuska-ssb/handshake#80).

@mycognosist mycognosist merged commit 0dea49f into main Oct 17, 2023
1 check failed
@mycognosist mycognosist deleted the event_driven_replication branch October 17, 2023 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code rewrite for clarity or performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant