OCM Journaling #219
Replies: 4 comments 2 replies
-
Journal for OCM provider A:
This can then be compressed to: Which is to be understood as:
upon replay request. |
Beta Was this translation helpful? Give feedback.
-
Instead of using one journal per provider, it would probably make sense to have one journal per message type (so shares and invites), and also each server needs to keep track of both outgoing ids as well as incomming ids. This could be an algorithm for implementing this at an ocm provider: Populating outgoing ids
Populating incomming idsA server MUST not care about lack of sequential id in an incomming message, but when it sees a provider use a sequential id for the first time and the sequence id != 1 the client SHOULD request all messages of the type from id 1 to to the id it has seen, and make sure there are no shares or invites (depending on type) that can not be tagged with an incomming sequential id. If it finds an orphan object in the database, it SHOULD be removed, as the remote server does not consider this a valid entry. This replay would populate incomming id for that provider, so now both incomming and outgoing ids are populated. ReplayTo facilitate replay we would need to introduce a mechanism to request all messages from a certain id, this could be done by adding a new tyoe of request to the /share and /invite-accepted endpoint respectively or by introducing one or more endpoints for this type of replay request. In any case, the response to a replay request MUST be a JSON array with all OCM messages potentially with a new noop message. We should also have a |
Beta Was this translation helpful? Give feedback.
-
For the record, this would also address #107 |
Beta Was this translation helpful? Give feedback.
-
What do you guys think about this? Should I make a pr to implement this? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
If we keep a sequential id, with number series per remote OCM server, and incorporate that in to any OCM message, it would be possible to recover state after an outage by requesting previous messages, and also to detect if message have been send that have been lost.
Beta Was this translation helpful? Give feedback.
All reactions