diff --git a/drafts/adding-real-time-collaboration-to-umap-first-week.html b/drafts/adding-real-time-collaboration-to-umap-first-week.html
index d2b822e..71952bc 100644
--- a/drafts/adding-real-time-collaboration-to-umap-first-week.html
+++ b/drafts/adding-real-time-collaboration-to-umap-first-week.html
@@ -97,7 +97,7 @@ the current code base.
The server is here mainly to handle access rights, store the data and send it over to the clients.
The actual rendering and modifications of the map are directly done in JavaScript, on the clients.
-The data is split in multiple layers. At the time of writing, concurrent writes to the same layers are not possible, as one edit would potentially overwrite the other one. It’s possible to have concurrent edits on different layers, though.
+The data is split in multiple layers. At the time of writing, concurrent writes to the same layers are not possible, as one edit would potentially overwrite the other. It’s possible to have concurrent edits on different layers, though.
When a change occurs, each DataLayer
is sent by the client to the server.
- The data is updated on the server.
@@ -110,17 +110,17 @@ the current code base.
- On one side are the properties (matching the
_umap_options
), and on the other, the geojson data (the Features key).
- Each feature is composed of three keys:
-- geometry: the actual geo object
-- properties: the data associated with it
-- style: just styling information which goes with it, if any.
+- geometry: the actual geo object
+- properties: the data associated with it
+- style: just styling information which goes with it, if any.

Real-time collaboration : the different approaches
Behind the “real-time collaboration” name, we have :
-- Streaming of the changes to the clients: when you’re working with other persons on the same map, you can see their edits at the moment they happen.
-- Concurrent changes: some changes can happen on the same data concurrently. In such a case, we need to merge them together and be able to
+- The streaming of the changes to the clients: when you’re working with other persons on the same map, you can see their edits at the moment they happen.
+- The ability to handle concurrent changes: some changes can happen on the same data concurrently. In such a case, we need to merge them together and be able to
- Offline editing: in some cases, one needs to map data but doesn’t have access to a network. Changes happen on a local device and is then synced with other devices / the server ;
Keep in mind these notes are just food for toughs, and that other approaches might be discovered on the way
@@ -336,7 +336,15 @@ poster="https://nuage.b.delire.party/s/kpP9ijfqabmKxnr">
type="video/mp4">
-And, that’s all for this week!
+It’s very rough, but the point was mainly to see how the library can be used, and what the API looks like. I’ve found that :
+
+- The
patches
object that’s being sent to the handle.on
subscribers is very chatty: it contains all the changes, and I have to filter it to get what I want.
+- I was expecting the objects to be sent on one go, but it’s creating an operation for each change. For instance, setting a new object to a key will result in multiple events, as it will firstly create the object, and the populate it.
+- Here I need to keep track of all the edits, but I’m not sure how that will work out with for instance the offline use-case (or with limited connectivity). That’s what I’m going to find out next week, I guess :-)
+- The team behind Automerge is very welcoming, and was prompt to answer me when needed.
+- There seem to be another API
Automerge.getHistory()
, and Automerge.diff()
to get a patch between the different docs, which might prove more helpful than getting all the small patches.
+
+We’ll figure that out next week, I guess!
#Python, #CRDT, #Sync - Posté dans la catégorie code