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

Perf: updated subscriber socket subsystem #55

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

mempirate
Copy link
Contributor

@mempirate mempirate commented Jan 5, 2024

Context

Previously all PublisherSessions (the components keeping track of a publisher connection inside of a SubSocket) where being polled in the same task, because they were all stored in a StreamMap. For small messages and a small number of sessions this is fine, but it means that:

  • All reading from / writing to socket buffers
  • All message encoding / decoding
  • All compression / decompression

For each of the active publisher sessions where happening in a single task.

Updates

This PR spawns each publisher session as a separate task and implements a bi-directional communication channel between the SubDriver and all of the PublisherSessions. This should be more efficient for larger messages, mixed workloads, and multiple publishers.

@mempirate
Copy link
Contributor Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@mempirate mempirate added A-socket Area: Sockets C-performance Category: Performance labels Jan 5, 2024
@mempirate mempirate added this to the v0.1.2-alpha milestone Jan 5, 2024
Copy link
Contributor

@merklefruit merklefruit left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

@mempirate mempirate merged commit 0c816ab into main Jan 5, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-socket Area: Sockets C-performance Category: Performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants