Allen Haim via DREAM firstname.lastname@example.org writes:
Doctor 1 carries out the examination while doctor 2 makes a
report as a series of notes to his own DMC.
The patients file is a set of notes (and possibly other documents
such as an X-Ray image, etc) and is a DMC.
At 12:00 the examination is done and the doctors sync their DMC
containers and then go home.
Doctor 1 has no internet at home but doctor 2 does.
Doctor 1 reads the report, and writes at 6:00pm: “I certify that
everything written up to this point is true”, but doctor 2
writes an obvious lie at 3:00pm and syncs it to core: “The
patient spread his wings and flew away.”
The time-stamp of notes is not reliable (and is not necessary for
DMC sets). The same situation could arise when doctor 2 really
writes his report about the patient spreading his wings at 7pm but
his devices clock has stopped and thinks it is 3pm.
Doctor 1 goes to her local coffee-shop, syncs to core (the phone
does that automatically), and submits the report, and then does
a massive facepalm. So what went wrong? Is this even a valid
usage of DREAM to begin with? If so, was it user error and what
could doctor 1 have done differently?
It might be not the best usage of DMC. Maybe for a patient file an
append-only log would be better. Consider the situation where
doctor 1 has already done the X-Ray scan but it is not yet synced
yet. Doctor 2 arrives and sees that the X-Ray scan is not there
and places the patient back in the tube - exposing the patient to
unnecessary dangerous X-Rays (replace X-ray with crazy medication
for a more extreme effect). For a patient file, the file should
maybe physically be with the patient to prevent such things from
Other questions: can doctor 1 edit doctor 2’s notes? Can doctor
2 even edit his own notes? Or does editing a note consist of
removing, altering, and resaving?
Yes. But there might be multiple ways of editing:
- As you say removing, altering and resaving.
- Creating an “Edit note” (a diff) that references the original
note. The “edit note” is a member of the DMC as everything else
but is displayed in the UI as a change to the original note. Users
can see what changes were made by the edit.
Also, does it make sense to put a timestamp on the notes and
have the application order them (since they’re just
undifferentiated elements of a DMC set?) Or will that quickly
Absolutely! The display order is completely left up to the
application. In some cases it might make sense to sort by creation
date (as for notes in this example) or by event date (for cultural
events or planned actions) or by geographical coordinates.
When the amount of data increases it might make sense for
clients/applications to maintain their own indices where things
are sorted in whatever way they want. This solves the performance
Since we mentioned a shared document: could one implement a
shared pad using DREAM? And if so how would it differ from the
In general yes. However, DMC only provides the Set and Register
containers. Maybe for text editing a CRDT of a
be better. Still many things can be done with a Set (with RDF
magic). See for example dokielie or csarven’s
thesis as a complete example:
Linked Research on the Decentralised Web.
How about a drawing program or shared whiteboard?
If you can come up with a RDF vocabulary that can encapsulate