dasch-swiss / dsp-api

DaSCH Service Platform API
http://admin.dasch.swiss
Apache License 2.0
74 stars 18 forks source link

Compounded Resources #785

Open loicjaouen opened 6 years ago

loicjaouen commented 6 years ago

Compounded Resources

We would like to have a way to describe composition links between resources and to have the same benefits on such linked resources as if they were values, namely be able to include them in the main resource's list of contributors as in #780.

Compounded resources are resources that have a composition link; the object of the link can not exist without the subject.
For example, a biography is a class composed of events, an event is a date and a place.

EinsteinBio --(hasEvent)--> Event { name: "born", date: "1879-03-14", place: "Ulm" }

Event born has no existence but in EinsteinBio.

Complexity

@benjamingeer and @subotic explained that exploring the graph is an exponential complexity, so adding a level to current one would be too expensive.

Flattening the graph

@benjamingeer fancied a way to flatten the graph and keep the complexity of exploring the compounded values by adding a redundant back link to the root resource: compound

This could be tried out to check if it is reactive enough.

loicjaouen commented 6 years ago

@benjamingeer adds that maybe all the compounded resources could be changed in an atomic transaction by acquiring locks on resources in a deterministic order.