-
Notifications
You must be signed in to change notification settings - Fork 0
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
Sync store - How old messages can be requestd for Sync #64
Comments
I have different perspective here:
This "general" case will not be common at all and should not be designed for. The fleets we have right now are not a good starting point when thinking about these concepts.
That should not be up to us. We only design the tools not how to use them.
Query to find the correct hashes then ask for messages from that hash list. |
That makes sense, thanks.
Yeah totally, we need to make it configurable so that clients/apps can choose depends on their needs. But then we need to think about different solutions based on different use cases, a Sync method might work for smaller data but not for bulk data.
Let me rephrase the question, based on how much older messages we aim to Sync, the implementation of such use case may differ, should we start thinking from that flexibility PoV? |
When you say older message what do you mean? If you mean timestamp wise, I don't think it matters. The protocol should not limit the range of queries. Now, implementations should limit requests and/or respond with multiple chunk of data but that's a detail. If you mean older version of messages then I think we could support any version if we treat messages as data blobs. Only the indexes would be different. As long as we can hash a message deterministically, the number of indexes that would point to a message based on version could change.
Why would it not work? |
yeah this one. got it!
I mean it would work but may not optimally, so need to consider tradeoffs, if we build a Prolly tree on top of all |
Yes the trees would be as big as the number of messages in the DB.
Otherwise how would you search for a specific message? Prolly trees are very efficient for random read and write. |
How about having two trees, one with let's say past 1 hour of activity and other with remaining, this way we can faster serve hot data which is more prone to be missed. We can also define priorities based on that since hot data is what real-time messaging use case will be interested in for instance. |
Prolly tree are ordered no need to split them. You would just iterate in reverse to search the latest messages. The time index would be a tree with timestamp as keys and hashes as values. |
In the Waku Store Sync protocol, a node that is out-of-activity/offline for some time can come back online and ask for messages it missed during the offline period, aka the Sync mechanism. More on the foundational aspects of Sync store here #62
The following Message sync policies should be answered:
The text was updated successfully, but these errors were encountered: