Synchronous Collaborative Text Editing in Wikis Jessica Rubart OWL University of Applied Sciences An der Wilhelmshöhe 44, 37671 Höxter Germany jessica.rubart@hs-owl.de ABSTRACT patterns aim at reusing object-oriented design structures, i.e. descriptions of communicating objects, interfaces, and Wikis are well-known for supporting collaborative writing. classes to solve a general object-oriented design problem in They are focusing on asynchronous collaboration. Today, a particular context [10]. Both, design patterns and wikis, synchronous text editing in the web is supported by several have originally been developed as agile forms of tools and approaches. However, this possibility is still technology following a simple reusable system [6]. The missing in wikis. Based on a prototype implementation, wiki idea was to provide a website, which allows users to this paper presents design considerations for a wiki quickly and easily share, modify, and improve information integrating synchronous collaborative editing as a special in a knowledge base collaboratively [15]. kind of hypertext authoring. Today, wikis are not only used for best practice patterns in CCS CONCEPTS software engineering, but also for sharing experiences in • Human-centered computing → Collaborative and several other domains, such as in project management or IT social computing systems and tools; Wiki; Synchronous service management. Storytelling is, amongst others, a editors • Human-centered computing → Interaction very important knowledge management instrument paradigms; Hypertext / hypermedia; collaborative supporting the understanding and sharing of experiences. interaction The most famous wiki is the online encyclopedia Wikipedia [6]. It is based on the Wikimedia technology2. KEYWORDS There are currently 286 active Wikipedia instances based Wiki, collaborative editing, synchronous editor, real-time on different languages. In total, there are presently more editor than 42 million articles [19] and the number is increasing strongly. However, if multiple users edit the same page at Reference format: the same time, this causes an edit conflict [20]. The user J. Rubart. 2017. Synchronous Collaborative Text Editing in saving the text at a later point in time than others needs to Wikis. In Proceedings of the Workshop on Narrative and Hypertext’17, Prague, Czech Republic, July 2017 (NHT’17), 5 merge the changes manually. This can be error-prone. pages, CEUR-WS.org. Through the versioning of wiki pages, errors can be resolved later, but this can cause much work. 1 INTRODUCTION Synchronous collaborative editing is a special case, but in Wikis1 support asynchronous collaborative editing of web the context of edit conflicts it might be very helpful. pages. The first wiki was invented by Ward Cunningham Today, synchronous text editing in the web is supported by in 1995 [6][15]. It was called “WikiWikiWeb” as a several tools and approaches. However, this possibility is substitute for quick web (“wikiwiki” is a Hawaiian word still missing in wikis, even though it can help supporting for “quick”) [5]. The application scenario was editing and the agile idea of self-organizing teams. sharing software engineering design patterns. Design In the following, this paper presents related work, a proof of concept implementation of a synchronous collaborative wiki, and first usage feedback. Afterwards, it focuses on design considerations for such a wiki. The paper ends with conclusions and future work. Copyright held by the author(s). 2 https://www.wikimedia.org/ NHT’17, July 2017, Prague, Czech Republic Jessica Rubart 2 RELATED WORK 3 PROOF OF CONCEPT Hypertext authoring has been worked on in several As a proof of concept, a wiki providing synchronous directions. In the context of a personal authoring collaborative text editing has been implemented [7]. Figure environment, NoteCards [13] is an important approach, for 1 shows a screen dump of the current prototype. Articles, example. In NoteCards, notes are represented as cards i.e. wiki pages, can be selected, edited, newly created, or holding text and images, and being interconnected with deleted. Presence awareness is provided, i.e. user names typed links. Fileboxes are a kind of composite notes useful currently editing one and the same article are visualized. In to organize large collections of notecards. In parallel, addition, editing awareness is provided through the HyperCard [11] came up as a simpler hypertext authoring visualization of remote cursors. tool for users of Mac computers. Ward Cunningham was involved in the development of HyperCard. It influenced 3.1 Implementation his first wiki project [5]. For integrating synchronous collaborative editing possibilities, we have used ShareJS. The ShareJS server In gIBIS [3], hypertext networks based on the Issue-Based uses operational transformations [1] [8], an operation-based Information System (IBIS) approach can be created synchronization mechanism for real-time collaboration. asynchronously in a group. IBIS is an argumentation-based ShareJS does not yet support shared cursors so that the approach focusing on problem solving. Cooperative visualization of remote cursors is implemented in an hypermedia approaches, such as in [16], focus on application-specific way based on the Ace6 editor. collaborative structuring – both asynchronously as well as synchronously with fine-grained notifications of other For this prototype implementation, MeteorJS 7 has been users’ interactions. In the context of hypertext narrative used as a platform for developing the wiki in JavaScript. In there is Tinderbox [2], for example. Tinderbox is a tool for addition, it provides hosting and deployment features for making, analyzing, and sharing notes focusing on spatial testing and evaluating applications. Based on this service, hypertext, informal semantics, and web collage. Hypertext first users have been able to access the prototype. notes can be published on the web. MeteorJS is written using NodeJS8 . We have integrated MongoDB 9 as the database backend. As stated above, The real-time editors Etherpad3 and Google docs4 support ShareJS is used for synchronous editing. Three editors web-based synchronous collaborative text editing based on have been integrated: A simple textarea, the Ace editor, and operational transformations as replication and concurrency CodeMirror 10 . The Ace editor and CodeMirror can be control mechanism [1]. This shows that the technology for customized with various themes. The input given in the synchronous collaborative text editing is basically available editor is assumed to be in the markdown 11 format. The and can be integrated in wikis. Webstrates [4] is a research application converts the given markdown text to HTML. project and a development platform. It provides a As soon as two or more users edit the same article, they get Webstrates server that persists and synchronizes changes to synchronized. the DOM of any page served by the Webstrates server. Based on this, flexible collaborative hypermedia systems TogetherJS12 is another JavaScript library, which supports can be built. For synchronous collaborative editing, the collaborative text editing. In addition, it already supports ShareJS5 library is used. shared cursors and integrates a text chat as well as an audio chat via WebRCT13. In our prototype, the communication In [17], patterns for the design of computer-mediated features of TogetherJS have been integrated. While interaction between humans are described focusing on ShareJS synchronizes JavaScript models, TogetherJS reusable best practices. One pattern is called “Shared integrates directly through the DOM (Document Object Editing” and focuses on the provision of an editor, with Model)14. which users can manipulate shared artifacts simultaneously. Studies, such as in [18], focus on investigating user behavior during real-time collaboration. It shows that there are also differences in cultures. For example, in the context 6 https://github.com/ajaxorg/ace/ of slide sharing, U.S. participants preferred individual 7 https://www.meteor.com/ 8 navigation through the slides, while Japanese participants https://nodejs.org/ 9 https://www.mongodb.com/ wished there was a moderator. 10 https://codemirror.net/ 11 https://tools.ietf.org/html/rfc7763/ 3 12 http://etherpad.org/ https://togetherjs.com/ 4 13 https://docs.google.com/ https://webrtc.org/ 5 14 https://github.com/share/ShareJS/ https://www.w3.org/DOM/ 2 Synchronous Collaborative Text Editing in Wikis NHT’17, July 2017, Prague, Czech Republic 3.2 First Usage Feedback distributed in different rooms and were asked to edit We did a first evaluation with a group of students using several web pages – similar to articles in Wikipedia. Groupware Observational User Testing [12]. With this Mostly, they have used the chat to communicate and evaluation method, evaluators observe users performing coordinate themselves. The audio chat did not work collaborative tasks in a laboratory setting. Problems are properly on all browsers. Communication is very monitored and users are asked to think aloud about what important in synchronous collaboration settings. they are doing. In addition, we have asked about feedback through a final questionnaire. The students were Figure 1: Proof of Concept Implementation Using ShareJS As a result, the prototype system basically illustrates the 4 DESIGN CONSIDERATIONS advantages of integrating synchronous editing in wikis In this section, we will look at and discuss design using operational transformations. Conflict situations and considerations from two perspectives, which are detailed in complex merging efforts can be avoided. However, this the following subsections: first evaluation also identified some drawbacks of our prototype system:  Collaborative writing strategies For using the communication tool, the users needed to as well as manage a session by themselves, i.e. to invite the other  Groupware and hypermedia design issues users whereas the shared editing was coupled automatically. 4.1 Collaborative Writing Strategies Not all integrated editors included the visualization of There are five well-known collaborative writing strategies remote cursors. The cursors are important awareness [14]. instruments. Without remote cursors, the users did not Firstly, a single author might write on behalf of a team. In know immediately where the others were editing. this case, from the technical point of view collaborative Students, who did not know the markdown syntax well, authoring features can be reduced to sharing the results. needed a lot of time to search and write according to the In sequential single writing, the shared document is passed syntax. For them, the synchronous collaboration helped to from one author to the next one, after the author has written learn the language. her or his part of the document. For this strategy, In a few cases the response time of the editor was traditional wikis are already well-suited as edit conflicts considered slow. cannot occur. In parallel writing, authors work on their part of the document at the same time, respectively. This can be managed with a traditional wiki assigning each group 3 NHT’17, July 2017, Prague, Czech Republic Jessica Rubart member a separate starting wiki page. However, if parallel parts of the shared data need to be coupled – the text or the writing does not mean separate sections, but different roles text and the navigation? Or can this be customized? in the authoring process, such as author, editor, or reviewer, It is also interesting to think about the integration of then edit conflicts might occur (dependent on the work WYSIWYG editors as not all authors want to use markup process). languages. In reactive writing, a document is created in real-time Finally, are there any privacy concerns that need to be without substantial preplanning. It is also known as joint considered? Usually, it is important to give users control writing, consensus writing, or reflective writing. Authors over which information gets shared and what remains react to each other’s changes or additions, e.g. by creating private. new sections or changing existing ones. In reactive writing, a high level of consensus is needed and can be According to Halasz’ seven issues for hypermedia systems developed. Version control is more complex and [13], versioning is an important feature to maintain and synchronous collaborative writing is necessary. manipulate a history of changes. Wikis already incorporate Finally, in mixed mode two or more of the collaborative versioning support. When integrating synchronous writing strategies are combined so that synchronous collaborative writing, one needs to differentiate versions collaborative writing can avoid edit conflicts and support necessary for concurrency control from document versions, consensus. which the authors would like to submit. Here, it might also be useful to integrate decision support to help authors to 4.3 Groupware and Hypermedia Design Issues decide when to submit a new joint version. Alternatively, According to well-known Groupware experiences, such as the system could be able to submit sections of a wiki page in [9], it is important to think about awareness features – separately as new versions. features that make visible other users and other users’ Regarding collaborative work, Halasz points out that a high interactions, such as presence awareness and shared degree of concurrent work is important. From the cursors. Also, in asynchronous collaboration, awareness viewpoint of the collaborative writing strategies, this is the features are important, e.g. to show which relevant wiki case with reactive writing. In asynchronous collaboration, pages have been updated since the last login. locking mechanisms shall be fine grained. Synchronous Another important issue is floor control. Shall authors be collaborative editing capabilities complement this view. able to write simultaneously or is there a moderator or a predefined process passing the floor to the different 5 CONCLUSIONS AND FUTURE WORK authors? In our proof of concept implementation, we give We have motivated the integration of synchronous authors, editing the same page at the same time, collaborative editing capabilities in wikis and presented a simultaneous writing possibilities. In this way, reactive proof of concept implementation. Based on this, we have writing is possible so that consensus can be built and described first usage feedback and design considerations editing conflicts can be avoided. for this special kind of hypertext authoring. Session control is another issue to consider. Do authors Currently, we are exploring further JavaScript libraries for need to invite others? In our prototype system, all authors, this hypertext authoring purpose to improve the prototype editing the same page at the same time, are automatically in implementation. a shared editing session. It could also be useful to ask In our future work, we would like to make a user study writers, with which writing strategy they would like to among Wikipedia authors to get more feedback and continue. In this context, a voting mechanism can be requirements regarding synchronous editing in wikis. helpful. A shared session should also establish a communication channel automatically. A joint editing session can either be planned or take place by chance. In any case, it is helpful to provide support for REFERENCES latecomers, i.e. people joining later than others. Can they [1] Mehdi Ahmed-Nacer, Claudia-Lavinia Ignat, Gérald Oster, Hyun- understand what happened? In our prototype system, they Gul Roh, and Pascal Urso. 2011. Evaluating CRDTs for Real-time can scroll through the document and see what has been Document Editing. In Proceedings of the ACM Symposium on Document Engineering (DocEng’11), Mountain View, California, edited. In addition, versioning support is usually useful. USA, ACM Press, New York. Furthermore, dedicated latecomer functionality might be helpful, such as recording and playing the session history. [2] Mark Bernstein. 2003. Collage, Composites, Construction. In Another issue are customized views. In our prototype, we Proceedings of Hypertext’03, ACM Press. have integrated three different editors, but the authors see [3] Conklin, J., and Begemann, M.L. gIBIS 1988. A Hypertext Tool and work on the same text. In addition, they can scroll for Exploratory Policy Discussion. In Proceedings of Computer individually. In this context, it needs to be decided which Supported Cooperative Work (CSCW), ACM Press, pp. 140-152. 4 Synchronous Collaborative Text Editing in Wikis NHT’17, July 2017, Prague, Czech Republic [4] Niels Olof Bouvin and Clemens N. Klokmose. 2016. Classical [19] Wikimedia. 2017. List of Wikipedias. Hypermedia Virtues on the Web with Webstrates. In Proceedings https://meta.wikimedia.org/wiki/List_of_Wikipedias. Retrieved of Hypertext and Social Media 2016 (HT’16), ACM Press. June 15, 2017. [5] Ward Cunningham. 2014. Wiki History. http://wiki.c2.com/?WikiHistory. Retrieved June 15, 2017. [20] Wikipedia Help: Edit Conflict. 2017. https://en.wikipedia.org/wiki/Help:Edit_conflict. Retrieved June [6] Ward Cunningham and Michael Mehaffy. 2013. Wiki as Pattern 15, 2017. Language. In Proceedings of the 20th Conference on Pattern Languages of Programs (PLoP'13), Monticello, Illinois, USA, ACM Press, New York. [7] Sandeep Reddy Dareddy. 2016. Integrating Operational Transformations in Wikis: Synchronous Editing in Wikis. Master’s thesis. OWL University of Applied Sciences, Lemgo, Germany. [8] C. A. Ellis and S. J. Gibbs. Concurrency Control in Groupware Systems. In: SIGMOD Record: Proceedings of the ACM SIGMOD Conference on the Management of Data - SIGMOD '89, 18(2):399- 407, May 1989. [9] C. A. Ellis, S. J. Gibbs, and G. Rein. 1991. Groupware: Some Issues and Experiences. In Communications of the ACM, Vol. 34, No. 1. [10] Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. 1995. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley. [11] D. Goodman. Complete HyperCard 2.0 Handbook. Random House Inc., 1990. [12] Carl Gutwin and Saul Greenberg. 2000. The Mechanics of Collaboration: Developing Low Cost Usability Evaluation Methods for Shared Workspaces. In Proceedings ot the 9th IEEE Int. Workshop on Enabling Technologies: Infrastructure for Collaborative Enterprises (WETICE ’00), 98–103. IEEE Comp. Society [13] F.G. Halasz. 2001. Reflections on NoteCards: seven issues for the next generation of hypermedia systems. In: ACM Journal on Computer Documentation (New York, NY, USA: ACM Press) 25 (3), pp. 71–87. doi:10.1145/507317.507321, reprint. [14] Paul Benjamin Lowry, Aaron Curtis, and Michelle R. Lowry. 2004. Building a Taxonomy and Nomenclature of Collaborative Writing to Improve Interdisciplinary Research and Practice. In Journal of Business Communication, Vol. 41, No. 1. [15] Bo Leuf and Ward Cunningham. 2001. The Wiki Way: Quick Collaboration on the Web. Addison-Wesley, London. [16] J. Rubart, J.M. Haake, D.A. Titze, and W. Wang. 2001. Organizing Shared Enterprise Workspaces Using Component-Based Cooperative Hypermedia. In Proceedings of Hypertext’01, ACM Press. [17] T. Schümmer, and S. Lukosch. Patterns for Computer-Mediated Interaction. John Wiley & Sons. 2007. [18] L. Scissors, N. S. Shami, T. Ishihara, S. Rohall, and S. Saito. Real- Time Collaborative Editing Behavior in USA and Japanese Distributed Teams. In Proceedings of the ACM International Conference on Human Factors in Computing Systems - CHI 2011, pages 1119-1128, Vancouver, BC, Canada, May 2011. ACM Press. 5