Font Size: a A A

Research And Implementation Of Real-time Collaborative Editing Based On Operational Transformation

Posted on:2022-04-11Degree:MasterType:Thesis
Country:ChinaCandidate:L HongFull Text:PDF
GTID:2518306602494814Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the continuous development of the Internet and communication technology in recent years,remote collaborative work is playing an increasingly important role in people's lives.Real-time collaborative editing,as an important part of remote collaborative work,has always been a hot research field.Real-time collaborative editing supports multiple users to edit and collaborate on the same document at the same time in different geographic locations.In order to achieve real-time feedback on user operations,data copy replication technology is usually used,but this will inevitably cause concurrent conflicts in user operations.Operational transformation technology is a method used to resolve concurrency conflicts of user operations while maintaining user intentions and maintaining data consistency.However,most of the operational transformation technologies have complex processing processes,which hinder their development in actual system applications.In view of the above needs and problems,the research work of this article mainly includes the research of operational transformation technology and the realization of real-time collaborative editing system.The Jupiter algorithm is an operational transformation algorithm designed for the clientserver model.It can be well adapted to the concurrent control of collaborative editing applications in the Web.However,the Jupiter algorithm only supports the atomic operation of a single character,and it has a large space overhead on the server,furthermore,its processing performance is low.In this paper,the Jupiter algorithm is extended and optimized,and a new consistency maintenance algorithm JOOT suitable for real-time collaborative editing applications in the Web is proposed.In this paper,the operational transformation function is redesigned to expand the operation unit from a single character to a string,which improves the processing power and performance of the algorithm;by using a three-state finite state machine for client state control,the space overhead required by the server is reduced,and the number of operational transformation on the server is reduced.In addition,in view of the fact that most of the user's editing operations are continuous text input in actual use scenarios,a client-side cache compression algorithm is proposed to reduce the length of the historical cache queue and reduce the cost of network transmission and operational transformation.Finally,through comparative analysis and correctness verification,it is shown that the JOOT algorithm can solve the concurrent conflicts in realtime collaborative editing,maintain data consistency,and the algorithm performance is significantly better than the Jupiter algorithm,which solves the problem of excessive pressure on the server by the Jupiter algorithm,so that the algorithm is better suitable for practical application scenarios.After carrying out detailed demand analysis and system design,this article adopts the B/S structure mode to realize the system.First,the basic functions of user management are realized,and the dual Token refresh mechanism is adopted to realize user identity authentication and use authority level division for access control to protect the security and privacy of user data.Then,various functional modules for the operations of document are implemented,and an online editor is implemented based on the code Mirror to meet the needs of users for various document operations and online editing and collaboration.Then,based on the JOOT algorithm,the consistency maintenance module of the system is realized,and the multi-user collaborative perception mechanism is designed and realized to reduce the conflict of users' operation intentions.In addition,the system uses the Web Socket protocol for full-duplex communication,which ensures the real-time push of communication messages from the server and reduces the overhead of communication resources.Finally,various functional modules have been tested in detail to ensure the running of the system is correct and stable.The test results show that the system can well support multi-user realtime collaborative editing and improve user collaboration efficiency.
Keywords/Search Tags:Collaborative Editing, Operational transformation, Consistency Maintenance, Cache Compression, B/S
PDF Full Text Request
Related items