A project for live data sharing

Hi everyone, I’d like to share my project m-ld with you, because it seems a natural fit with Solid and I hope it might be useful.


At heart it’s a technology for sharing a live dataset between collaborating actors, like users or robots. It uses an RDF data representation, with JSON-LD for the interface. It’s decentralised, but intended to fit well with existing data architectures including both client-server and ‘local-first’.

In a Solid app, m-ld could be used to, for example, share draft structured documents with collaborative editing (sometimes called ‘multiplayer’). The document could be synced to a Pod live, or perhaps when it’s ready to be published.

I can see that this general idea has been discussed here before and I’ve added some thoughts to that topic.

So far we’ve got to a preview release with a Javascript engine that works in the browser or a Javascript back-end. We’ve got lots still to do, but I’d love to hear your thoughts. Are there Solid projects that need live data sharing (or want it in future)?


Hi George, I am interested in your thoughts. I developed a medical questionnaire (https://demo.mp50.sosaro.com/en/questionnaire/1/), that results in a PDF with all data presented in the way doctors learn in Med-school. That PDF is a timestamped document of 1-2 pages with the full medical history. I look for a way to help patients better connect to their doctors, improving the patient-doctor dyad that way. This could be a perfect use case for your m-ld project. What do you think? More info: https://sosaro.com/assets/press-release/press_en_final_07sep2020.pdf Hope to hear from you. Hans

1 Like

Hi Hans, thanks. Your medical questionnaire app looks interesting. If I understand correctly, the patient is in charge of their medical history as a single ‘file’, which is versioned, and can be output as a PDF. I put file in quotes because it is not necessarily in a conventional file system, but on the cloud. Where is it kept by the app at the moment?

The ‘data sharing’ part of the app is about sharing between patient and doctor. When shared, during a medical appointment or for a time afterward, the doctor should be able to edit the history. It seems that there should also be limits on what the doctor can see (“the patient chooses which parts he shares with the medical professional”), and perhaps also what the doctor can edit.

This certainly sounds like an ideal use-case for Solid, because it is important that the ownership of patient’s data is clear and controlled, ideally independently of the app provider and of the storage provider.

There are two main ways that m-ld could be useful:

  1. If the doctor and the patient will edit the structured data at the same time. For example, they may be filling in details on separate devices. I’m not sure this is required, because the doctor will probably add new details as a new entry to the history, and if they wish to edit some previous details, then it is probably not at the same time as the user. It would be okay to allow the doctor to request temporary exclusive access to such a previous record while they edit it.
  2. If the history must never be saved anywhere but the patient’s personal devices (a mobile device and a browser, perhaps). Using m-ld would allow this, and keep the devices synchronised with each other. Is this a requirement? I suspect most patients would not mind if the data is stored on the cloud, so long as it is private? Also, since they use only one device at a time, they do not mind if synchronisation takes even a few seconds, going to the data store and back when changes are detected.

I have a few more thoughts but maybe I am assuming too much about the requirements for the app, so I will slow down!

@gsvarovsky could m-ld be used to synch this kind of graph ?https://scenaristeur.github.io/solid-vue-panes/semapps (click on ‘Assemblee Virtuelle’, then on a node like pair:Project)


Since the data is JSON-LD it is easy to load into m-ld. I have made a small example Node.js script here:

(I downloaded the JSON-LD context file and used it as the context in the configuration, and then removed the context reference from the JSON-LD data. This is just because I haven’t tested m-ld with context references.)

You can do the same in the browser.

Once the data is in m-ld, it can be edited by multiple processes at the same time.

We are just about to launch a Playground web app for m-ld which will make it easier to try out data like this, and see the synchronisation. I will test with your data and post a link when it’s ready.

Can you tell me, what do you think the users would like to do, that requires the graph sync?

1 Like

In fact, I will add creation of nodes and edges like I did on spoggy-simple


https://youtu.be/EE-0eoJ3dBo (how to)

And would like to allow sync graph editing.
I’m most interested in browser side do you have browser libs ?

You can bundle the npm module with Browserify. Webpack will probably work too. We haven’t provided a built bundle yet, but I can put one together if using a bundler is not right for you.

m-ld now has a Playground for trying out transactions and queries against a browser-local clone:


If you’re familiar with JSON-LD and SPARQL it should be mostly unsurprising. The fun starts when you open two browser tabs and connect to the same domain with them.

There’s still lots of work to do (in particular, there’s a microtasks library bug that makes query results sloooow to appear – it’s not fundamental, I promise) so I’d love feedback on the most important things to get on with!

1 Like