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

Clean up and speed up pub/sub logic #990

Merged
merged 32 commits into from
Feb 9, 2025
Merged

Clean up and speed up pub/sub logic #990

merged 32 commits into from
Feb 9, 2025

Conversation

badrishc
Copy link
Contributor

@badrishc badrishc commented Feb 2, 2025

  • Remove unsafe code and unnecessary generics
  • No clobbering of network buffers, use ArgSlice correctly
  • Use a new ReadOptimizedConcurrentSet structure for efficient sub matching
  • Publish path is now zero copy (except for the single copy from publisher network buffer to subscriber network buffer)
  • Improve the async publish (via TsavoriteLog) to eliminate all memory allocations
  • Fix various small bugs in pub/sub responses and implementation

@badrishc badrishc marked this pull request as ready for review February 2, 2025 03:17
@badrishc badrishc marked this pull request as draft February 3, 2025 23:26
@badrishc badrishc marked this pull request as ready for review February 4, 2025 01:58
@badrishc badrishc requested a review from TalZaccai February 6, 2025 18:27
Copy link
Contributor

@TalZaccai TalZaccai left a comment

Choose a reason for hiding this comment

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

OMG this is SO MUCH CLEANER! Love it! Few suggestions.

libs/server/PubSub/ConcurrentList.cs Outdated Show resolved Hide resolved
libs/server/PubSub/ConcurrentList.cs Outdated Show resolved Hide resolved
libs/server/ByteArrayWrapper.cs Show resolved Hide resolved
libs/server/PubSub/SubscribeBroker.cs Outdated Show resolved Hide resolved
@badrishc badrishc changed the title Clean up pub/sub logic Clean up and speed up pub/sub logic Feb 9, 2025
@badrishc badrishc merged commit 046fcd8 into main Feb 9, 2025
18 checks passed
@badrishc badrishc deleted the badrishc/pubsub-v2 branch February 9, 2025 22:08
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.

2 participants