ProseMirror collaborative editing advice, and are Phoenix watchers intended for use in production?

Hi,

For some context, I am working on a project where I am using Prosemirror for the editor and would like to introduce Collaborative Editing. This requires the use of the ProseMirror Transform library to handle the “merging” of changes into the server’s version of the document.

This is a JavaScript library so I am thinking of running this as a separate server serving a REST API which Phoenix will send the current document and the changes to, and get the resulting document back.

I would like to have Phoenix be in charge of starting and stopping the server, so I was wondering if setting up a watcher for this is the best approach? Or would it make more sense to spin up a separate GenServer to handle this?

I am rather new to Elixir and Phoenix in general and would appreciate any advice. Any advice on alternative solutions to the separate JS server is also very welcome.

Thanks!

2 Likes

Hi soulpoint,

Thinking about doing something similar, but curious what approach you ended up taking? I’ve been considering trying to port ProseMirror Transform to Elixir, but your approach sounds more sane.

–John

1 Like