Real-Time Co-Editing of Geographic Features
Abstract
:1. Introduction
2. State of the Art
2.1. CRDTs for Ensuring Strong Eventual Consistency
- Multi-value register (MVR);
- Last writer wins (LWW);
- Observed remove (OR).
2.2. Linear Geometry (Co-)Editing Using CRDTs
3. Employing CRDTs for Geometry Co-Editing
3.1. Geometry-Based Ordering of Conflicting Inserts
3.2. Interleaving and the Effects of Editing Direction
4. Tentative Operations
- Preserve the original intent of the operation.
- Create a session-wide syntactically correct operation.
- Create the most probable session-wide semantically correct operation.
4.1. Approach
- When the user initiates dragging, detect and store the geometry range for the tentative operation.
- When the user completes the edit, integrate all buffered remote operations.
- If the tentative operation’s geometry range has changed due to the integration of buffered remote operations, adjust the original geometry range to the updated state of the data.
- Determine the final integration parameters by selecting the most geometrically appropriate position within the adjusted geometry range.
4.2. Tentative Operation’s Geometry Range
- element (element.content, element.id, element.originLeft, element.originRight, element.isDeleted).
- UPD (insElement, delElement).
- RTop = (LRE, RRE).
- RTop.deleteShift (Rtop.RRE|RTop.LRE);
- RTop.updateShift (Rtop.RRE|RTop.LRE).
- RTop.deleteShift(P2) >> RTop = (P1, P3);
- RTop.updateShift(P3) >> RTop = (P1, P4).
Algorithm 1. Projecting geometry range of a tentative operation |
IF Op.isUpdate THEN IF Op.delElement.id==RTop.LRE.id THEN RTop=RTop.updateShift(RTop.LRE) ELSE IF Op.delElement.id==RTop.RRE.id THEN RTop=RTop.updateShift(RTop.RRE) END IF ELSE IF Op.isdelete THEN IF Op.delElement.id==RTop.LRE.id THEN RTop=RTop.deleteShift(RTop.LRE) ELSE IF Op.delElement.id==RTop.RRE.id THEN RTop=RTop.deleteShift(RTop.RRE) END IF END IF |
4.3. Integrating Tentative Operations
- Primary requirement: The insertion of the tentative point must not introduce self-intersections within projected geometry range.
- Secondary requirement: The insertion of the tentative point is carried out at a position that produces the straightest split.
- Tentative segment 1 (ts1) is generated by connecting the Pte with the point previous to Ptg (marked as Ppr in Figure 19) (dashed green line).
- Tentative segment 2 (ts2) is generated by connecting Pte with Ptg (solid green line).
Algorithm 2. Positioning of a tentative point |
bestAv=180, winningIdx=null FOR each undeleted point from LRE+1 until RRE AS Ptg DO Generate ts1 and ts2 Determine Av at current Ptg FOR each current line segment from LRE until RRE AS curLS DO IF (NOT crosses (ts1,curLS)) AND (NOT crosses (ts2,curLS)) THEN IF Av<bestAv THEN bestAv=Av winningIdx=Ptg.idx END IF END IF END FOR END FOR |
5. Testing
5.1. Test System Implementation
5.2. Experiment
6. Discussion
7. Conclusions
Supplementary Materials
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Goodchild, M.F. Citizens as sensors: The world of volunteered geography. GeoJournal 2007, 69, 211–221. [Google Scholar] [CrossRef]
- JOSM Conflict Resolution. Available online: https://learnosm.org/en/josm/josm-conflict-resolution/ (accessed on 9 September 2024).
- Sun, Y.; Li, S. Real-time collaborative GIS: A technological review. ISPRS J. Photogramm. Remote Sens. 2016, 115, 143–152. [Google Scholar] [CrossRef]
- Weikum, G.; Vossen, G. Transactional Information Systems Theory, Algorithms, and the Practice of Concurrency Control and Recovery, 1st ed.; Elsevier Inc.: Amsterdam, The Netherlands, 2001; 201AD; ISBN 978-1-55860-508-4. [Google Scholar]
- Yaqin, S.; Chen, X.; Jinxiong, W.; Hang, Y.; Haibo, S.; Xiumei, Z.; Lin, Z. Development of a multi-view and geo-event-driven real-time collaborative GIS. Int. J. Digit. Earth 2022, 15, 134–147. [Google Scholar] [CrossRef]
- Kang, X. Graph-based synchronous collaborative mapping. Geocarto Int. 2015, 30, 28–47. [Google Scholar] [CrossRef]
- Seo, Y.H.; Kim, D.; Hong, B. Concurrent Updating of Large Spatial Objects. In Proceedings of the International Conference on Database Systems for Advanced Applications, Jeju Island, Republic of Korea, 17–19 March 2004. [Google Scholar]
- Jing, C.; Zhu, Y.; Fu, J.; Dong, M. A Lightweight Collaborative GIS Data Editing Approach to Support Urban Planning. Sustainability 2019, 11, 4437. [Google Scholar] [CrossRef]
- Van Oosterom, P. Maintaining consistent topology including historical data in a large spatial database. In Proceedings of the Auto-Carto, Seattle, WA, USA, 8–10 April 1997; pp. 327–336. [Google Scholar]
- Fechner, T.; Wilhelm, D.; Kray, C. Ethermap: Real-time Collaborative Map Editing. In Proceedings of the 33rd ACM SIGCHI Conference on Human Factors in Computing Systems, Seoul, Republic of Korea, 18–23 April 2015; ACM: New York, NY, USA, 2015; pp. 3583–3592. [Google Scholar]
- Shapiro, M.; Preguiça, N.; Baquero, C.; Zawirski, M. Conflict-free replicated data types. In Proceedings of the 13th International Conference on Stabilization, Safety, and Security of Distributed Systems, Grenoble, France, 10–12 October 2011; Springer: Berlin/Heidelberg, Germany, 2011; pp. 386–400. [Google Scholar]
- Gomes, V.B.F.; Kleppmann, M.; Mulligan, D.P.; Beresford, A.R. Verifying strong eventual consistency in distributed systems. Proc. ACM Program. Lang. 2017, 1, 1–28. [Google Scholar] [CrossRef]
- Ellis, C.A.; Gibbs, S.J. Concurrency control in groupware systems. In Proceedings of the ACM SIGMOD Conference, Portland, OR, USA, 31 May–2 June 1989. [Google Scholar]
- Preguiça, N.M.; Marquès, J.M.; Shapiro, M.; Letia, M. A Commutative Replicated Data Type for Cooperative Editing. In Proceedings of the 2009 29th IEEE International Conference on Distributed Computing Systems, Montreal, QC, Canada, 22–26 June 2009; pp. 395–403. [Google Scholar]
- Imine, A.; Molli, P.; Oster, G.; Rusinowitch, M. Proving correctness of transformation functions in real-time groupware. In Proceedings of the Eighth Conference on European Conference on Computer Supported Cooperative Work, Helsinki, Finland, 14–18 September 2003; Kluwer Academic Publishers: New York, NY, USA, 2003; pp. 277–293. [Google Scholar]
- Nichols, D.A.; Curtis, P.; Dixon, M.; Lamping, J. High-latency, low-bandwidth windowing in the Jupiter collaboration system. In Proceedings of the ACM Symposium on User Interface Software and Technology, Pittsburgh, PA, USA, 15–17 November 1995. [Google Scholar]
- Sun, C. Operational Transformation Frequently Asked Questions and Answers. Available online: https://www3.ntu.edu.sg/scse/staff/czsun/projects/otfaq/ (accessed on 13 February 2023).
- Lv, X.; He, F.; Cheng, Y.; Wu, Y. A novel CRDT-based synchronization method for real-time collaborative CAD systems. Adv. Eng. Inform. 2018, 38, 381–391. [Google Scholar] [CrossRef]
- Lv, X.; He, F.; Yan, X.; Wu, Y.; Cheng, Y. Integrating selective undo of feature-based modeling operations for real-time collaborative CAD systems. Futur. Gener. Comput. Syst. 2019, 100, 473–497. [Google Scholar] [CrossRef]
- Gao, L.; Xu, X. A New Algorithm for Real-Time Collaborative Graphical Editing System Based on CRDT. In Proceedings of the Computer Supported Cooperative Work and Social Computing, 13th CCF Conference, ChineseCSCW 2018, Guilin, China, 18–19 August 2018; Sun, Y., Lu, T., Xie, X., Gao, L., Fan, H., Eds.; Springer: Singapore, 2019; pp. 201–212. [Google Scholar]
- Burckhardt, S.; Gotsman, A.; Yang, H.; Zawirski, M. Replicated data types: Specification, verification, optimality. In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Diego, CA, USA, 22–24 January 2014; Association for Computing Machinery: New York, NY, USA, 2014; pp. 271–284. [Google Scholar]
- Shapiro, M.; Preguiça, N.M.; Baquero, C.; Zawirski, M. Convergent and Commutative Replicated Data Types. Bull. EATCS 2011, 104, 67–88. [Google Scholar]
- Oster, G.; Urso, P.; Molli, P.; Imine, A. Data consistency for P2P collaborative editing. In Proceedings of the 2006 20th Anniversary Conference on Computer Supported Cooperative Work, Banff, AL, Canada, 4–8 November 2006; Association for Computing Machinery: New York, NY, USA, 2006; pp. 259–268. [Google Scholar]
- Roh, H.-G.; Jeon, M.; Kim, J.-S.; Lee, J. Replicated abstract data types: Building blocks for collaborative applications. J. Parallel Distrib. Comput. 2011, 71, 354–368. [Google Scholar] [CrossRef]
- Weiss, S.; Urso, P.; Molli, P. Logoot: A Scalable Optimistic Replication Algorithm for Collaborative Editing on P2P Networks. In Proceedings of the 2009 29th IEEE International Conference on Distributed Computing Systems, Montreal, QC, Canada, 22–26 June 2009; pp. 404–412. [Google Scholar]
- Nédelec, B.; Molli, P.; Mostefaoui, A.; Desmontils, E. LSEQ: An adaptive structure for sequences in distributed collaborative editing. In Proceedings of the 2013 ACM Symposium on Document Engineering, Florence, Italy, 10–13 September 2013; Association for Computing Machinery: New York, NY, USA, 2013; pp. 37–46. [Google Scholar]
- Lv, X.; He, F.; Cai, W.; Cheng, Y. A string-wise CRDT algorithm for smart and large-scale collaborative editing systems. Adv. Eng. Inform. 2017, 33, 397–409. [Google Scholar] [CrossRef]
- Sun, D.; Sun, C.; Agustina; Cai, W. Real Differences between OT and CRDT in Correctness and Complexity for Consistency Maintenance in Co-Editors. Proc. ACM Hum. Comput. Interact. 2020, 4, 1–30. [Google Scholar] [CrossRef]
- Gentle, J. 5000× faster CRDTs: An Adventure in Optimization. Available online: https://josephg.com/blog/crdts-go-brrr/ (accessed on 9 September 2024).
- Gentle, J. I Was Wrong. CRDTs are the Future. Available online: https://josephg.com/blog/crdts-are-the-future/ (accessed on 9 September 2024).
- Nicolaescu, P.; Jahns, K.; Derntl, M.; Klamma, R. Near Real-Time Peer-to-Peer Shared Editing on Extensible Data Types. In Proceedings of the 2016 ACM International Conference on Supporting Group Work, Sanibel Island, FL, USA, 13–16 November 2016. [Google Scholar]
- Jahns, K. yjs. Available online: https://github.com/yjs/yjs (accessed on 9 September 2024).
- Automerge. Available online: https://github.com/automerge/automerge (accessed on 9 September 2024).
- Kleppmann, M.; Beresford, A.R. A conflict-free replicated JSON datatype. IEEE Trans. Parallel Distrib. Syst. 2017, 28, 2733–2746. [Google Scholar] [CrossRef]
- Gentle, J. Reference Crdts. Available online: https://github.com/josephg/reference-crdts (accessed on 9 September 2024).
- OpenLayers. Available online: https://openlayers.org/ (accessed on 13 February 2023).
- Herring, J.R. OpenGIS Implementation Standard for Geographic Information—Simple Feature Access—Part 1: Common Architecture; Open Geospatial Consortium: Wayland, MA, USA, 2011. [Google Scholar]
- Weidner, M.; Kleppmann, M. The Art of the Fugue: Minimizing Interleaving in Collaborative Text Editing. arXiv 2023, arXiv:2305.00583. [Google Scholar]
- Kleppmann, M.; Gomes, V.B.F.; Mulligan, D.P.; Beresford, A.R. Interleaving anomalies in collaborative text editors. In Proceedings of the 6th Workshop on Principles and Practice of Consistency for Distributed Data, Dresden, Germany, 25 March 2019; Association for Computing Machinery: New York, NY, USA, 2019. [Google Scholar]
- Typescript CLI Options. Available online: https://www.typescriptlang.org/docs/handbook/compiler-options.html (accessed on 9 September 2024).
- Socket.IO. Available online: https://socket.io/ (accessed on 9 September 2024).
Session | No. of Participants | No. of Edits | No. of Upd. and Ins. Edits | No. of Tentative Operations | Session Duration (s) | Accumulated Dragging Time (s) |
---|---|---|---|---|---|---|
1 | 5 | 144 | 124 | 7 | 73 | 128 |
2 | 5 | 108 | 102 | 14 | 60 | 95 |
3 | 7 | 196 | 177 | 23 | 91 | 201 |
4 | 7 | 145 | 126 | 15 | 51 | 126 |
5 | 9 | 171 | 168 | 23 | 65 | 145 |
6 | 9 | 154 | 146 | 21 | 54 | 147 |
7 | 12 | 174 | 146 | 24 | 98 | 156 |
8 | 12 | 141 | 117 | 16 | 62 | 113 |
9 | 18 | 234 | 197 | 43 | 58 | 141 |
10 | 18 | 199 | 161 | 23 | 56 | 112 |
Number of Users | Avg. Number of Tentative Ops per Run | Time Spent Dragging (% of Session Duration) |
---|---|---|
5 | 10.50 | 167 |
7 | 19.00 | 234 |
9 | 22.00 | 248 |
12 | 20.00 | 171 |
18 | 33.00 | 222 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Published by MDPI on behalf of the International Society for Photogrammetry and Remote Sensing. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Matijević, H.; Vranić, S.; Kranjčić, N.; Cetl, V. Real-Time Co-Editing of Geographic Features. ISPRS Int. J. Geo-Inf. 2024, 13, 441. https://doi.org/10.3390/ijgi13120441
Matijević H, Vranić S, Kranjčić N, Cetl V. Real-Time Co-Editing of Geographic Features. ISPRS International Journal of Geo-Information. 2024; 13(12):441. https://doi.org/10.3390/ijgi13120441
Chicago/Turabian StyleMatijević, Hrvoje, Saša Vranić, Nikola Kranjčić, and Vlado Cetl. 2024. "Real-Time Co-Editing of Geographic Features" ISPRS International Journal of Geo-Information 13, no. 12: 441. https://doi.org/10.3390/ijgi13120441
APA StyleMatijević, H., Vranić, S., Kranjčić, N., & Cetl, V. (2024). Real-Time Co-Editing of Geographic Features. ISPRS International Journal of Geo-Information, 13(12), 441. https://doi.org/10.3390/ijgi13120441