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

feat(rust): improve ockam_node #8718

Draft
wants to merge 5 commits into
base: davide-baldo/router-as-shared-object
Choose a base branch
from

Conversation

SanjoDeundiak
Copy link
Member

@SanjoDeundiak SanjoDeundiak commented Dec 22, 2024

  1. Using Oneshot channels where possible - faster, better semantics, avoiding async when sending a signal
  2. Less async operations
  3. Less clones
  4. HashMaps and HashSet instead of BTreeMap and BTreeSet
  5. More granular locks (lock individual fields instead of the whole struct)
  6. Renaming to improve vocabulary consistency
  7. Using Weak<Router>
  8. Use tokio::Handle instead of tokio::Runtime where possible

TODO:

  1. Tests
  2. Try lockless structures (HashMaps and HashSets at least)

@SanjoDeundiak SanjoDeundiak force-pushed the sanjo/ockam_node_impl branch 7 times, most recently from d623ed3 to 483a9e1 Compare December 25, 2024 16:29
@SanjoDeundiak SanjoDeundiak force-pushed the sanjo/ockam_node_impl branch 2 times, most recently from 3b8a913 to 0572200 Compare December 30, 2024 21:31
@@ -4,5 +4,3 @@ pub mod common;
pub mod session;
#[allow(dead_code)]
pub mod test_spans;
#[allow(dead_code)]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etorreborre is it ok to delete it? It looks unused

@SanjoDeundiak SanjoDeundiak force-pushed the sanjo/ockam_node_impl branch 4 times, most recently from 71b857c to 394b88b Compare January 9, 2025 21:10
@SanjoDeundiak SanjoDeundiak force-pushed the sanjo/ockam_node_impl branch 5 times, most recently from 3f5bbcc to 3eb88c0 Compare January 10, 2025 01:20
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.

1 participant