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

Scene edition Collaboration #47

Closed
sdumetz opened this issue Nov 8, 2023 · 1 comment · Fixed by #53
Closed

Scene edition Collaboration #47

sdumetz opened this issue Nov 8, 2023 · 1 comment · Fixed by #53
Assignees
Labels
eCorpus eCorpus server or UI code feature New feature or request Story voyager-story code

Comments

@sdumetz
Copy link
Member

sdumetz commented Nov 8, 2023

Allowing collaboration on a scene would require some new features.

In short the process would be :

  1. Compare the PUT request with the document it was referenced against to compute a list of changes
  2. Apply this list of changes onto the document's latest revision if possible
  3. fine-tune 2. conflicts resolution using field testing

The main building block missing here is the ability to compare a change against its reference. It could be done client-side by saving the Etag header to send it back as If-Match on save. It's a slightly unorthodox use of the If-Match header.

Another option is to send a Set-Cookie header on GET that references the current version, then get the cookie's value on PUT. That's slightly invasive, in particular if we do it on every scene requests. It might be acceptable because it's session cookies so it at least won't cause too much privacy concerns.

A third option would be to embed a unique ID into the document. It would be sent as-is to the client and then be parsed back on PUT, hinting at the reference's version. There would be practically no additional overhead because we have to parse the document on save anyways if we want to compute a diff so it's no big deal inserting a nonce into it before serialization.

the second and third options would require little to no client code change.

@sdumetz sdumetz added feature New feature or request Story voyager-story code eCorpus eCorpus server or UI code labels Nov 8, 2023
@sdumetz sdumetz self-assigned this Nov 8, 2023
@sdumetz
Copy link
Member Author

sdumetz commented Nov 9, 2023

Cookie storage is looking bad : can't store a tab-specific cookie, so we have bad edge cases when a user opens multiple tabs.

@sdumetz sdumetz linked a pull request Feb 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eCorpus eCorpus server or UI code feature New feature or request Story voyager-story code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant