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: start adding support to unsubscribe entity susbcriptions #1857

Closed
wants to merge 6 commits into from

Conversation

Larkooo
Copy link
Collaborator

@Larkooo Larkooo commented Apr 22, 2024

No description provided.

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 54 lines in your changes are missing coverage. Please review.

Project coverage is 70.05%. Comparing base (10f7f9f) to head (11f7a6b).
Report is 4 commits behind head on main.

Files Patch % Lines
crates/torii/grpc/src/server/mod.rs 0.00% 24 Missing ⚠️
crates/torii/grpc/src/client.rs 0.00% 14 Missing ⚠️
crates/torii/client/src/client/mod.rs 0.00% 10 Missing ⚠️
...ates/torii/grpc/src/server/subscriptions/entity.rs 0.00% 3 Missing ⚠️
...rii/grpc/src/server/subscriptions/event_message.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1857      +/-   ##
==========================================
- Coverage   70.14%   70.05%   -0.10%     
==========================================
  Files         315      315              
  Lines       35607    35657      +50     
==========================================
+ Hits        24977    24979       +2     
- Misses      10630    10678      +48     

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

@Larkooo Larkooo force-pushed the unsubscribe-entities branch from 14988cf to b637576 Compare April 22, 2024 16:50
@Larkooo Larkooo requested a review from broody April 22, 2024 18:21
Copy link
Collaborator

@broody broody left a comment

Choose a reason for hiding this comment

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

LGTM, just minor comment

crates/torii/grpc/proto/world.proto Show resolved Hide resolved
@glihm glihm added the torii label Apr 23, 2024
@Larkooo
Copy link
Collaborator Author

Larkooo commented Apr 23, 2024

This PR might be closed in favor of dojoengine/dojo.c#25 which uses a client-side approach to close subscription streams. GRPC Will clean up those afterwards.

The problem with the server-side approach is that it adds a bit more complexity than the client-side approach. Doing that server-side involves adding new endpoints for cancelling subscriptions & keeping track of the subscription ID, while the client-side one doesn't have those downsides. The only potential down side is that the subscription cleanup will not be done directly. Only after some time that the stream has closed and gets removed from the GRPC subscriptions

@Larkooo Larkooo closed this Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants