After my yesterday’s e-mail, Federico Tomassetti of Strumenta wrote in to remind me of his WebEditKit project. I didn’t mention it yesterday but it is definitely worth knowing about because it is another actively developed approach to bringing MPS to the Web.

Architecturally, WebEditKit and its companion project, MPSServer, are similar to the demo from Kolja: both provide a UI framework for editing models that are stored on a backend in languages defined in MPS.

The main difference is that while Kolja’s demo communicates with the Modelix model server, WebEditKit communicates with MPSServer which runs directly within a headless MPS instance as a plugin. MPSServer exposes the MPS project via a HTTP or WebSocket interface.

As such, the two architectures differ in their approach to versioning and model checking.

Modelix stores each small change as a separate revision in its special purpose data structure implemented on top of a key-value store (Apache Ignite), running on top of a relational database (PostgreSQL). The operational transformation algorithm used by Modelix will resolve merge conflicts between two parallel edits automatically and consistently, so that both clients see the same end result, although neither of them may like it.

MPSServer is far simpler: by default it uses Git, commits have to be made explicitly via an API call and merge conflicts have to be resolved manually (no API for that). This makes it easy to use as a prototype on projects that do their development with Git and are not ready yet to migrate to Modelix data structures.

Although Modelix is more advanced on the collaboration front, MPSServer has its advantage when it comes to reusing logic defined in MPS. The model server from Modelix has no knowledge of any checking rules nor constraints defind in MPS and will simply store the data you tell it to store. Any additional rules would have to be implemented by the client. For MPSServer, running inside a live MPS instance, it is simply a matter of querying its host for errors pertaining to a particular node.

Since Modelix can also integrate into MPS as a storage backend, it is in fact possible to use MPSServer/WebEditKit together with Modelix to get the best of both worlds. Federico has also told me that he looked into combining ProjectIt and MPSServer for a customer project and achieved some early successes.