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

Add ZMQ PUSH/PULL sockets to process notifications #35

Merged
merged 1 commit into from Sep 22, 2023

Conversation

jagerman
Copy link
Member

Addresses a performance bottleneck with doing a full processing (involving mutex locks + database transaction) on every new message notification; the overhead and lock contention incurred by the mutex and (mostly) the database transaction mean we can end up processing incoming notifications more slowly than we are getting sent them by the network.

This moves all such processing into a dedicated thread, with a simple PUSH/POLL zmq socket structure to feed messages from workers into the notification handler thread.

Addresses a performance bottleneck with doing a full processing
(involving mutex locks + database transaction) on every new message
notification; the overhead and lock contention incurred by the mutex and
(mostly) the database transaction mean we can end up processing incoming
notifications more slowly than we are getting sent them by the network.

This moves all such processing into a dedicated thread, with a simple
PUSH/POLL zmq socket structure to feed messages from workers into the
notification handler thread.
@jagerman
Copy link
Member Author

This is live and now working much, much better.

@jagerman jagerman merged commit 5da2d5c into oxen-io:v2 Sep 22, 2023
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.

None yet

1 participant