umap-project / umap

uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site.
https://umap-project.org
Other
1.2k stars 227 forks source link

Concurrent editing #468

Open Biondilbiondo opened 7 years ago

Biondilbiondo commented 7 years ago

When two or more admins add points on the same layer umap can't handle both edits and so ask you to select wich one should be saved, as mantoined in issue #89. I have implemented a basical handling of this situaition that is: if it is possible to merge the two editing without ambiguity, do the merge without displayng the allert otherwise dislay the allert as in the current code. My repo is: https://github.com/Biondilbiondo/django-leaflet-storage

yohanboniface commented 7 years ago

Nice move! I'll have a deeper look asap. That would needs a lot of unit tests, though. Also, when the merge has been done with success, you may reload the layer from the client, to minimize possible future conflicts.

Biondilbiondo commented 7 years ago

Yes, in fact if the server merge two concurrent editing and the client does not update its json the next editing result in loss of data, so we have add a forced reload at the end of each editing. @svalo https://github.com/Biondilbiondo/Leaflet.Storage/commit/9e2f5cb607bf7d889445365c78ca621aee31ab74

yohanboniface commented 6 years ago

For reference http://jsonpatch.com/ may also be an option.

Biondilbiondo commented 6 years ago

Ok, now I have no time for further modifing the code, but we have used the patch for one year and we had no problem. I think that after a little more testing it would be ok as is. Have you found any problems or any scenarios that could rise problems?

yohanboniface commented 6 years ago

Ok, now I have no time for further modifing the code, but we have used the patch for one year and we had no problem.

Wah, cool, I didn't know your patch was used in real life!

I'm in the process of releasing a 1.0 of uMap (see #583), which also merges all three repositories in one (django-leaflet-storagge and leaflet-storage will be included in umap), in order to make it easier to contribute and maintain. Once this is done, I really want to spend time on concurrent editing, and thus I'll look into your patch in more details. :)

Biondilbiondo commented 6 years ago

https://map.obiezionerespinta.info/en/ this is the site where the modified version of umap is used, if you need it we could gave you acess to a development version of the website.

yohanboniface commented 6 years ago

https://map.obiezionerespinta.info/en/ this is the site where the modified version of umap is used, if you need it we could gave you acess to a development version of the website.

Thanks for that, but I think I'll simply test your patch locally when I'm on it. I'll let you know and share here my tests. Great work, and thanks again! :)

gendy54 commented 4 years ago

Hello,

I've just seen the ticket and the proposed code. What action can be taken on this ticket?

We use uMap in emergency situations with Visov and the lack of multi-user mode penalizes us a lot. An example of a map: http://umap.openstreetmap.fr/fr/map/esov-inondations-0112_394366#9/43.5854/6.0178

--- En français ---

Je viens de voir le ticket et les propositions de code. Quelles suites peuvent être données à ce ticket?

Nous utilisons uMap en situation d'urgence avec l'association Visov et l'absence de mode multi-utilisateurs nous pénalise beaucoup. Nous matérialisons les remontées d'informations issues de la veille des réseaux sociaux et diffusons de l'information aux citoyens et aux pouvoirs publics. Ce blocage nous contraint à travailler seul sur la partie carto alors que les infos à cartographier sont parfois nombreuses et s’enchaînent rapidement (nous devons donc parfois prioriser ce qui mérite d'être cartographié). . Un exemple de carte: http://umap.openstreetmap.fr/fr/map/esov-inondations-0112_394366#9/43.5854/6.0178 image

Merci tout plein ;) Donat

Edit; je viens de voir qu'il y a une PR #772 à ce sujet. C'est que ca ne devrait pas tarder à améliorer la situation ;)

polx commented 3 years ago

Hello,

maybe it would be wise to introduce a warning before editing? I've met lots of users who believe umap can do concurrent editing and then they kill each other's changes. This has been so since years and really damages the uptake of umap which is quite a pity. One typical use case is to put people's pins of their homes during a conference.

The only privacy-clean alternative I know which can do concurrent editing of points on a map is xwiki with the interactive maps application.

Paul

polx commented 3 years ago

PS: I don't understand why the issue talks about admin... but I guess it means just about any editor... I've never met admins in UMap.