atomic-data-docs icon indicating copy to clipboard operation
atomic-data-docs copied to clipboard

Changing schemas (e.g. datatypes for properties) can break apps

Open joepio opened this issue 4 years ago • 0 comments

If you use a Property in a Resource, and that property's Datatype later changes (e.g. from string to resourceArray), several things can break. For starters, I just experienced that atomic-data-browser crashed when I tried to view a Property-Value combination with non-matching datatypes. But this type of issue can happen anywhere when people either change or remove properties.

Some solutions:

Use immutable identifiers

Tim Berners-Lee once said: cool URIs don't change, but there is no guarantee in HTTP that they don't. If properties are immutable, however, they cannot change.

Using IPFS for properties solves this: #42

Prevent editing Properties using is-blocked

We can add a is-blocked property to Properties. If that is true, the Property should not easily be overwritten. The UI could check for the presence of this, like with is-dynamic.

Track dependencies with foreign keys

When a Resource links to another (target) Resource, we could create a foreign key, which indicates to the target resource that it's dependent on it. When the Target resource changes, the server containing the Target should send a message to the Subscriber, which means the Target's server notifies the Subscriber's server of the change

#43

joepio avatar Aug 30 '21 15:08 joepio