Some topics on architecture #28
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Hi, thank you for making a great plugin.
We previously created our own plugin for our company based on this repository.
I'd like to share some points we noticed when we created it. We deleted it in the end because we no longer need collaborative editing features, though.
This is not an issue, so you can close this “issue” after you read it. I just want to pay you back.
I'm sorry I haven't had time to put out PRs.
Scalability of backend servers
As mentioned in this issue, there is a demand for making backend servers scalable.
We've scaled our servers through Redis.
Use this if you need it. https://github.com/kazekyo/automerge-spider
Eliminating the use of
catch
https://github.com/cudr/slate-collaborative/search?q=catch&unscoped_q=catch
catch
is used in this repository. I think this is dangerous.Those
catch
break the synchronization ofAutomerge <=> Slate
orClient <=> Backend
(especially, vector clock synchronization in Automerge.Connection). In most cases, there is no automatic recovery.This leads to claims like "Hey, the text I wrote wasn't saved!".
If there are errors that you can't resolve as a result of removing the
catch
, I will be happy to help you with your investigation.Eliminating the use of temporary tree
https://github.com/cudr/slate-collaborative/blob/master/packages/bridge/src/convert/index.ts#L30-L35
I know this is not your idea, but I don’t think the temporary tree is a good idea.
If the
create
operation is not included in theDiff
, no elements will be created in the temporary tree. Soset_node
may not work properly.Also, using a temporary tree makes the code more complex.
Anyway, it is safer to generate slate operations with the docs before and after applying
Diff
.I'll share the code.
https://github.com/kazekyo/collaborative-editing-fragment/blob/master/generateSlateOperation.ts#L198-L235
This is a part of our code that we can share. We didn't use cursors, so we don't have any code associated with them.
https://github.com/kazekyo/collaborative-editing-fragment
Again, thank you so much! You've saved us a lot of time.
The text was updated successfully, but these errors were encountered: