webratte / Shared-Memo

A Webxdc App to share Memos via Delta Chat (e.g. in groups)
GNU General Public License v3.0
5 stars 1 forks source link

If more then one who changed the content it will become complicated #14

Closed webratte closed 1 year ago

webratte commented 1 year ago

I have no idea how to fix this problem.

Mabye compare the timestamps and always show the newest version. In this case we need to warn the user if it's change become outdated whil sent.

This is a just a raw first idea.

webratte commented 1 year ago

The last received Update will shown. If a message is pending there will be different versions for different users.

I see no way to fix this via webxdc.

Probably this is also a problem with other webxdc Apps. Also by sending Highscores or other informations that will sent by a webxdc.

WofWca commented 1 year ago

Have you considered CRDTs for this? Like Yjs, Automerge, json-joy? We have the editor app, it handles conflicts automatically. It's based on Yjs, namely on our handy library. There is also the checklist app, which relies on Automerge.

webratte commented 1 year ago

Thank you for your hint. I'm relativ new on coding. I will take a look in it.

Currently I just compare sent time (unixtime) and import only the newest update to keep all members in sync.

I think the most important problem is, to have different Versions on different devices.

webratte commented 1 year ago

In rare cases, "summery" and "document" is wrong if update messages come at nearly the same time.

Since it's not possible to change the value while runtime I played around with resend update. But this eventually creates unnecessary mail traffic.

So I think I will not fix it. Because it's really rare.