20.1. Overview

The main concepts in this model are

  • CouchdbServer

  • Repository

  • ModelManifest

  • VersionedModelManifest.

A CouchdbServer instance describes a particular, existing server on the open internet. Its address is registered in the CouchdbServer instance. A Couchdb installation should be present on that server and the Perspectives user creating the CouchdbServer instance should have Admin credentials for this Couchdb installation. The credentials must be entered in MyContexts; they are added to the CouchdbServer$Admin role. For this CouchdbServer instance, a database is created with the standard name cw_servers_and_repositories.

CouchdbServer has a Visitor role that publishes to this database. Hence, a public version of the CouchdbServer instance is available at this publicly accessible URL. The Visitor has a perspective on PublicRepositories, a filtered version of the role Repositories that is filled with Repository instances. These instances have a public Visitor role, too; it publishes to the same cw_servers_and_repositories database. Consequently, a Visitor can navigate from a CouchdbServer to its (public) Repositories (there may be private Repositories, too) and his PDR retrieves all these instances from the same database.

Within a Repository, the Visitor has a perspective on a role Manifests filled with ModelManifest. However, Manifests are grouped by namespace. For example, both the System model and the CouchdbManagement model are in the perspectives.domains namespace. The PDR translates a model URI like model://perspectives.domains#Systems automatically to a URL that retrieves the compiled model (the DomeinFile). In doing so, it assumes that the DomeinFile is in a database whose name is derived from the namespace. In our example this will be the database models_perspectives_domains. It also derives a URL from the model URI that points to the models Manifest. It assumes this manifest is in the database cw_perspectives_domains.

Now we have the following situation:

  • the Repository instance describing the namespace perspectives.domains is expected in the cw_servers_and_repositories database

  • the CouchdbManagement and System ModelManifest files are expected in the cw_perspectives_domains database.

ModelManifest has a Visitor role, too. The instance that is associated with the namespace perspectives.domains publishes to the cw_perspectives_domains database. We now have everything in its place, because, for example, the ModelManifest describing the CouchdbManagement model is, indeed, stored in the database where the PDR expects it to be.


1. If no authoring role is provided by the API caller, we take it to be the System User.