12.4.2. Multiple databases

To prevent misconceptions, please remember that each user keeps his own stuff. That is, a database of entities just contains the entities as seen by a single user! Their peers have a database, too, and they will contain their versions of the entities accessible to both.

InPlace v0.7.0 stores all data in a single Couchdb instance on the local computer of the end user. What might be reasons for changing that? Here are three use cases:

  • MyContexts-in-the-cloud: a user decides to store his data with a service at some endpoint on the internet, for reasons of availability, safety, whatever.

  • A home server, with more capacity than, say, a mobile phone.

  • The wish to store some entities, e.g. relating to a particular domain such as insurances, with a third party while keeping other data local.

This requires a change in the nature of the links themselves. Currently, they merely identify entities; but we need them to locate entities. It is the change from an URI to an URL.

To make it practical, more is required. A user needs safe and private access to endpoints that keep his data and that will require authentication and possibly encryption. This is all usual stuff; however, the THPs need to be able to authenticate and de- and encrypt on their users’ behalf.

Furthermore, a remote database may be unavailable for some time. The THP should be able to handle this. This has repercussions for the current implementation because it is built on the assumption that an entity identifier can always immediately be exchanged for the representation of the identified entity and that would no longer be the case.