Skip to content

Conversation

@FZambia
Copy link
Member

@FZambia FZambia commented Feb 9, 2025

Currently unidirectional transports require an intermediary ConnectRequest construction. Which abstracts away protocol package, but to avoid extra allocations this PR provides a way to use protocol.ConnectRequest directly when calling Client.ProtocolConnect. Also, support headers in intermediary ConnectRequest.

Also, optimizations for SSE and HTTP-streaming emulation transports: write many messages before calling Flush.

And open a road for delta compression for server-side subscriptions by setting Delta in subscriptions of ConnectRequest.

@FZambia FZambia changed the title Various client protocol optimizations Unidirectional connect with protocol.ConnectRequest Feb 9, 2025
@codecov
Copy link

codecov bot commented Feb 9, 2025

Codecov Report

Attention: Patch coverage is 64.19753% with 29 lines in your changes missing coverage. Please review.

Project coverage is 83.30%. Comparing base (e280f73) to head (cd3ff94).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
handler_http_stream.go 52.00% 8 Missing and 4 partials ⚠️
handler_sse.go 43.75% 6 Missing and 3 partials ⚠️
client.go 79.48% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #459      +/-   ##
==========================================
- Coverage   83.31%   83.30%   -0.02%     
==========================================
  Files          39       39              
  Lines        8840     8851      +11     
==========================================
+ Hits         7365     7373       +8     
- Misses       1118     1119       +1     
- Partials      357      359       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@FZambia FZambia marked this pull request as ready for review February 11, 2025 21:33
@FZambia FZambia changed the title Unidirectional connect with protocol.ConnectRequest Unidirectional transports: optimizations and delta encoding support enabler Feb 14, 2025
@FZambia FZambia merged commit a8d9577 into master Feb 14, 2025
8 checks passed
@FZambia FZambia deleted the protocol_optimizations branch February 14, 2025 06:06
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