# Collaborative text editing using Goblins

**URL:** <https://community.spritely.institute/t/collaborative-text-editing-using-goblins/674>\
**Category:** Standards\
**Created:** [February 1, 2025, 2:12pm UTC](https://community.spritely.institute/t/collaborative-text-editing-using-goblins/674 "2025-02-01T14:12:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![teddd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.spritely.institute/teddd/32/370_2.png) [@teddd](https://community.spritely.institute/u/teddd)\
**Post date:** [February 1, 2025, 2:12pm UTC](https://community.spritely.institute/t/collaborative-text-editing-using-goblins/674/1 "2025-02-01T14:12:31Z")

</div>

It might be interesting to have a specification for collaborative text editing which can be implemented by any text editor. This way groups could edit documents at the same time from whatever interface they like.

I seems like the atom text editor has published such a standard [Teletype for Atom](https://atom-editor.cc/teletype/), although I’m not sure how easy it would be for other editors to implement it. There is also this discontinued project [tandem](https://github.com/typeintandem/tandem) that goes more into the direction of being editor agnostic.

I’m new both to Goblins and distributed systems, so I was wondering if Goblins would be a good tool to develop such a standard. This might also help me understand the scope and use of Goblins a bit better, by putting it in the context of a specific problem. Any thoughts on this ?

---

<div class="post-metadata">

**Author:** ![jboy](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.spritely.institute/jboy/32/362_2.png) [@jboy](https://community.spritely.institute/u/jboy)\
**Post date:** [February 6, 2025, 11:27am UTC](https://community.spritely.institute/t/collaborative-text-editing-using-goblins/674/2 "2025-02-06T11:27:21Z")

</div>

At FOSDEM there was a question of [CRDTs](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type) and how they relate to the Goblins model. The answer was that CRDTs are not an alternative to what Goblins provides, but that a CRDT data structure could be sent by Goblins through the netlayer (paraphrasing from memory here, so correct me if I’m wrong). That could enable a collaborative editing application.

Another project I came across recently built on p2panda: [Introducing Project Aardvark – Space and Meaning](https://blogs.gnome.org/tbernard/2024/12/18/aardvark/)

---

<div class="post-metadata">

**Author:** ![teddd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.spritely.institute/teddd/32/370_2.png) [@teddd](https://community.spritely.institute/u/teddd)\
**Post date:** [February 6, 2025, 5:14pm UTC](https://community.spritely.institute/t/collaborative-text-editing-using-goblins/674/3 "2025-02-06T17:14:04Z")

</div>

Nice thanks for the references. It looks like CRDT is a reasonable building block for such an app.

The project you just mentioned is using Automerge (a CRDT library) on top of p2panda which is the netlayer. So I guess one could use Goblins as the netlayer instead. It seems like Automerge is based on json, so I guess a sensible choice for a CRDT in Gobelins would be based on s-expressions ?

---

<div class="post-metadata">

**Author:** ![jboy](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.spritely.institute/jboy/32/362_2.png) [@jboy](https://community.spritely.institute/u/jboy)\
**Post date:** [February 7, 2025, 11:28am UTC](https://community.spritely.institute/t/collaborative-text-editing-using-goblins/674/4 "2025-02-07T11:28:13Z")

</div>

I don’t know what the preferred serialization format would be. I’ve seen talk about csexp, Preserves, Syrup and more. I guess [it’s still in flux](https://www.ocapn.org/meeting-minutes/march-2024.html).

---

<div class="post-metadata">

**Author:** ![dthompson](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.spritely.institute/dthompson/32/95_2.png) [@dthompson](https://community.spritely.institute/u/dthompson)\
**Post date:** [February 7, 2025, 2:47pm UTC](https://community.spritely.institute/t/collaborative-text-editing-using-goblins/674/5 "2025-02-07T14:47:22Z")

</div>

The OCapN group has agreed to move forward with Syrup as the serialization format. Regarding netlayers, Goblins is not a netlayer. In OCapN, a netlayer is a medium for transporting messages. Some examples are Tor and libp2p.

---

<div class="post-metadata">

**Author:** ![teddd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.spritely.institute/teddd/32/370_2.png) [@teddd](https://community.spritely.institute/u/teddd)\
**Post date:** [February 7, 2025, 9:12pm UTC](https://community.spritely.institute/t/collaborative-text-editing-using-goblins/674/6 "2025-02-07T21:12:58Z")

</div>

Ok. So given you have data serialized in Syrup, then you still need something to merge data to make it a CRDT, right ?

---

<div class="post-metadata">

**Author:** ![dthompson](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.spritely.institute/dthompson/32/95_2.png) [@dthompson](https://community.spritely.institute/u/dthompson)\
**Post date:** [February 10, 2025, 2:15pm UTC](https://community.spritely.institute/t/collaborative-text-editing-using-goblins/674/7 "2025-02-10T14:15:05Z")

</div>

Yes, you need to implement the CRDT structure on top, regardless of what the specific serialization format is.
