# A project for live data sharing

**URL:** <https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454>\
**Category:** General Discussion\
**Created:** [September 18, 2020, 12:30pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454 "2020-09-18T12:30:56Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsvarovsky](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/gsvarovsky/32/1973_2.png) [@gsvarovsky](https://forum.solidproject.org/u/gsvarovsky)\
**Post date:** [September 18, 2020, 12:30pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/1 "2020-09-18T12:30:56Z")

</div>

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.

[https://m-ld.org/](https://m-ld.org/)

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](http://forum.solidproject.org/t/application-of-crdts-to-solid/3321) 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)?

---

<div class="post-metadata">

**Author:** ![hanshendrickx](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/hanshendrickx/32/1690_2.png) [@hanshendrickx](https://forum.solidproject.org/u/hanshendrickx)\
**Post date:** [September 22, 2020, 10:59am UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/2 "2020-09-22T10:59:29Z")

</div>

Hi George, I am interested in your thoughts. I developed a medical questionnaire ([https://demo.mp50.sosaro.com/en/questionnaire/1/](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](https://sosaro.com/assets/press-release/press_en_final_07sep2020.pdf) Hope to hear from you. Hans

---

<div class="post-metadata">

**Author:** ![gsvarovsky](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/gsvarovsky/32/1973_2.png) [@gsvarovsky](https://forum.solidproject.org/u/gsvarovsky)\
**Post date:** [September 22, 2020, 12:16pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/3 "2020-09-22T12:16:07Z")

</div>

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](https://github.com/solid/solid-spec/blob/master/api-websockets.md).

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

---

<div class="post-metadata">

**Author:** ![Smag0](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/smag0/32/310_2.png) [@Smag0](https://forum.solidproject.org/u/Smag0)\
**Post date:** [September 25, 2020, 9:00pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/4 "2020-09-25T21:00:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gsvarovsky](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/gsvarovsky/32/1973_2.png) [@gsvarovsky](https://forum.solidproject.org/u/gsvarovsky)\
**Post date:** [September 26, 2020, 9:35am UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/5 "2020-09-26T09:35:06Z")

</div>

Yep!

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

> <https://github.com/m-ld/m-ld-nodejs-starter/blob/popock-test/index.js>

(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?

---

<div class="post-metadata">

**Author:** ![Smag0](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/smag0/32/310_2.png) [@Smag0](https://forum.solidproject.org/u/Smag0)\
**Post date:** [September 26, 2020, 12:38pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/6 "2020-09-26T12:38:37Z")

</div>

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

[https://scenaristeur.github.io/spoggy-simple/](https://scenaristeur.github.io/spoggy-simple/)

[https://youtu.be/EE-0eoJ3dBo](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 ?

---

<div class="post-metadata">

**Author:** ![gsvarovsky](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/gsvarovsky/32/1973_2.png) [@gsvarovsky](https://forum.solidproject.org/u/gsvarovsky)\
**Post date:** [September 27, 2020, 7:45am UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/7 "2020-09-27T07:45:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gsvarovsky](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/gsvarovsky/32/1973_2.png) [@gsvarovsky](https://forum.solidproject.org/u/gsvarovsky)\
**Post date:** [October 8, 2020, 6:45am UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/8 "2020-10-08T06:45:53Z")

</div>

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

[https://m-ld.org/playground/](https://m-ld.org/playground/)

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!

---

<div class="post-metadata">

**Author:** ![gsvarovsky](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/gsvarovsky/32/1973_2.png) [@gsvarovsky](https://forum.solidproject.org/u/gsvarovsky)\
**Post date:** [December 1, 2020, 9:36am UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/9 "2020-12-01T09:36:10Z")

</div>

For some light entertainment we’ve put together an infographic about CRDTs:  
[![collaboratenable your app with CRDTs](https://europe1.discourse-cdn.com/flex017/uploads/solidproject/original/2X/a/a4721b7039b7fcb9c7794ed17a3910368b9d8861.png)](https://bit.ly/3o5TU0w)

I think having a live collaboration is going to be table stakes for all apps with write/edit features before long… Of course I do! but seriously, does this spark an idea for a Solid use-case we should be looking at?

---

<div class="post-metadata">

**Author:** ![anon36056958](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@anon36056958](https://forum.solidproject.org/u/anon36056958)\
**Post date:** [December 1, 2020, 2:34pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/10 "2020-12-01T14:34:03Z")

</div>

It looks like Meld uses Mqtt, an Oasis standard. There has been some controversy about Oasis policy regarding patents, see [https://en.wikipedia.org/wiki/OASIS\_(organization)#Patent\_disclosure\_controversy](https://en.wikipedia.org/wiki/OASIS_(organization)#Patent_disclosure_controversy)

from [https://js.m-ld.org/](https://js.m-ld.org/) :

A **m-ld** clone uses a ‘remotes’ object to communicate with other clones.

- If you have an MQTT broker available, use [`MqttRemotes`](https://js.m-ld.org/#mqtt-remotes).
- For a scalable global managed service, use [`AblyRemotes`](https://js.m-ld.org/#ably-remotes).

and

[Ably](https://www.ably.io/) provides infrastructure and APIs to power realtime experiences at scale. It is a managed service, and includes pay-as-you-go [developer pricing](https://www.ably.io/pricing)

---

<div class="post-metadata">

**Author:** ![gsvarovsky](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/gsvarovsky/32/1973_2.png) [@gsvarovsky](https://forum.solidproject.org/u/gsvarovsky)\
**Post date:** [December 1, 2020, 2:48pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/11 "2020-12-01T14:48:27Z")

</div>

> [@anon36056958](#):
>
> It looks like Meld uses Mqtt, an Oasis standard

Indeed, as the first implemented option. Thanks for the link, interesting. MQTT and Ably are the network providers we’ve started with – easy to try out and reliable. Ultimately though, **m-ld** is agnostic; all it needs is a way to get messages from clone to clone. I’d be interested to know what you have in mind?

---

<div class="post-metadata">

**Author:** ![anon36056958](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@anon36056958](https://forum.solidproject.org/u/anon36056958)\
**Post date:** [December 1, 2020, 2:52pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/12 "2020-12-01T14:52:02Z")

</div>

I was thinking something free and open source based on SAFE or IPFS, if that makes sense.

---

<div class="post-metadata">

**Author:** ![gsvarovsky](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/gsvarovsky/32/1973_2.png) [@gsvarovsky](https://forum.solidproject.org/u/gsvarovsky)\
**Post date:** [December 1, 2020, 3:00pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/13 "2020-12-01T15:00:02Z")

</div>

OK, sure. Thanks for the feedback. Given the ick factor with MQTT, we could switch to [socket.io](http://socket.io) as the baseline. SAFE or IPFS definitely do-able; also Matrix (I think?). I’d like to have a true peer-to-peer option on the table.

---

<div class="post-metadata">

**Author:** ![anon36056958](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@anon36056958](https://forum.solidproject.org/u/anon36056958)\
**Post date:** [December 1, 2020, 4:02pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/14 "2020-12-01T16:02:42Z")

</div>

Being able to collaborate in real time would be awesome.

It seems like it would go together with mobiles, phones. People collaborating while moving around. Something also related to this is geolocation, gps. And of course Solid is all about permissions.

So I’m thinking it might be useful and maybe there is a way to ensure that people are in or near a certain place before they are allowed to collaborate on something. Like you can comment and contribute but only if you’re actually physically in or near a certain location.

-edit-  
fwiw 😄

---

<div class="post-metadata">

**Author:** ![gsvarovsky](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/gsvarovsky/32/1973_2.png) [@gsvarovsky](https://forum.solidproject.org/u/gsvarovsky)\
**Post date:** [December 1, 2020, 5:40pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/15 "2020-12-01T17:40:19Z")

</div>

> [@anon36056958](#):
>
> fwiw

iw wiw 👍

Rolling with it… you’d need some a secure geolocation service to prevent trivial spoofing, or maybe a kind of multi-factor “he claims to be here but I see no Bluetooth from him”. Beyond that, seems straightforward. What’s the end-user superpower though…? I’m thinking medical emergency response maybe. Real-time logistics in a dynamic environment. “Need saline at this location.” Perhaps less dramatically, “I need toilet paper but Tesco is out.” “Plenty at Asda.” For consumers, gamify, to make it compelling to contribute.

---

<div class="post-metadata">

**Author:** ![anon36056958](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@anon36056958](https://forum.solidproject.org/u/anon36056958)\
**Post date:** [December 2, 2020, 1:39pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/16 "2020-12-02T13:39:32Z")

</div>

News, real estate, construction, engineering, maintenance, safety, regulatory compliance, travel, consumer, health care

Probably I missed some

---

<div class="post-metadata">

**Author:** ![gsvarovsky](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/gsvarovsky/32/1973_2.png) [@gsvarovsky](https://forum.solidproject.org/u/gsvarovsky)\
**Post date:** [July 14, 2021, 2:51pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/17 "2021-07-14T14:51:25Z")

</div>

Hi listeners, a quick update from me on **m-ld**!

Here are the headlines; visit [the website](https://m-ld.org/news/#vision-release-projects) for more details…

- sharing our vision with the world at the [NLnet Linked Data webinar](https://nlnet.nl/events/20210621/LinkedData/) and the SEMANTiCS conference in September
- a new [starter project](https://github.com/m-ld/m-ld-web-starter) for web apps
- a new [messaging plug-in](https://js.m-ld.org/#socketio-remotes) using Socket.io (as suggested above!)
- a new release of the [Javascript engine](https://js.m-ld.org/)
- threat modelling in our EU-funded [security research project](https://github.com/m-ld/m-ld-security-spec)

Of course I’d also love to make progress on [Live shared Pod Data – making it happen](https://forum.solidproject.org/t/live-shared-pod-data-making-it-happen/4061)… Ideas and feedback always welcome!

---

<div class="post-metadata">

**Author:** ![gsvarovsky](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/gsvarovsky/32/1973_2.png) [@gsvarovsky](https://forum.solidproject.org/u/gsvarovsky)\
**Post date:** [January 21, 2022, 5:37pm UTC](https://forum.solidproject.org/t/a-project-for-live-data-sharing/3454/18 "2022-01-21T17:37:11Z")

</div>

The next version of the **m-ld** [Javascript&nbsp;Engine](https://js.m-ld.org/) has been published (on [npm](https://www.npmjs.com/package/@m-ld/m-ld))! We’ve been working hard on usability and performance, and we’ve also included the latest [prototype work](https://github.com/m-ld/m-ld-js/pull/85) from the [Security Project](https://github.com/m-ld/m-ld-security-spec).

We’re moving fast towards [our vision](https://bit.ly/data-aether) of _data-wrangling-free_ information sharing. The security work is key, not only because it boosts, um, security 😜, but also because it signposts the way to _decentralised extensibility_.

Of course, we share this goal with Solid: we want anyone to be able to create new information sharing behaviours and rules, which work well together – security rules are just one example. One superpower this gives is to be able to dynamically adapt the presentation of information as its rules evolve. But more than that, it also gives users more freedom to _change which app they use_, while keeping their data intact.

To us, these behaviours _are also shared information_. So when you use them in a **m-ld** domain, they will appear in the domain data itself… which means they’re also shared, live!

We’ll be writing a lot more on this topic soon. But do let me know if it piques your interest 🤔
