Portable services for portable tools

General principles

  1. Strings should be used as identifiers across the interface.
  2. Numerical IDs are used in database tables and the Hibernate implementation, but they are not exposed for use outside of the implementation. They can be used as foreign key constraints.
  3. A 'user' in a portable application is identified through a table with three strings (username, authority, and directory service), which are used by the application and exposed in interfaces, and a numeric id for Hibernate / database use.
  4. The site, or context, in which a tool is operating is called the 'nexus', and is identified by a UUID string, and stored in a table including the UUID and the directory service used by the application and exposed in interfaces, and a numeric id for Hibernate / database use.

    The user strings are

    1. username (generally in the form of an email address)
    2. the authority which provided that username and guarantees its uniqueness within that authority domain
    3. a string which is used to identify the method and location for accessing further information about the user.

    username+authority is a unique key constraint.

    It is unlikely but possible that the same username will come from different authorities at some time, if the data is maintained over a period of years. E.g. a guest account registered by stellar this year is an email address. That email address could be reused and a different person with a the same email address may get an account through a new MIT guest service next year. They are able to get a new account from that service, since it's separate from the stellar guest service. This is a different person, and we know they are different because the authority is different. For guest accounts, it's likely that a new authority string will be used each year as the guest accounts are deactivated by the account managers. But the data in our application will be OK and consistent because we have sufficient data stored locally.

    The nexus strings are

    1. an opaque UUID, unique key constraint
    2. a string which is used to identify the method and location for accessing further information about the nexus.