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

Configurable latching of message history on client connection #371

Closed
Tracked by #380
KtorZ opened this issue May 31, 2022 · 0 comments
Closed
Tracked by #380

Configurable latching of message history on client connection #371

KtorZ opened this issue May 31, 2022 · 0 comments
Labels

Comments

@KtorZ
Copy link
Collaborator

KtorZ commented May 31, 2022

Why & What

Currently, when a client connect (via WebSocket) to a Hydra node, the server replays the entire history of event through the connection. This is meant to allow stateless event-driven clients that can be fully driven by the API. However, as the head grows and lasts, this initial dump can be large and unnecessary for some use-cases where clients are only really interested in the latest events.

This ought to be made optional (perhaps as a response to a specific message, or, when passed a specific sub-protocol to the websocket).

Note that, a side (albeit perhaps more important) concern is that this whole history of event is currently maintained in plain memory, effectively causing a memory leak on the server which has to retain all messages floating inside the head. This thereby relate to and should be fixed by #187.

@KtorZ KtorZ added 💭 idea An idea or feature request amber ⚠️ Medium complexity or partly unclear feature labels May 31, 2022
@ch1bo ch1bo changed the title Don't (always) dump head history on client connection Configurable latching of message history on client connection Jun 7, 2022
@ch1bo ch1bo added task and removed 💭 idea An idea or feature request amber ⚠️ Medium complexity or partly unclear feature labels Jun 7, 2022
@ch1bo ch1bo closed this as completed Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants