Sound Advice - patterns

Tales from the homeworld

My current feeds

Published: Wed Jul 2 20:38:52 EST 2008

Updated: Sun Jul 6 12:25:07 EST 2008

Registry

Intent

Support serendipitous reuse across an architecture

Motivation

Producer P and consumer C want to transfer a document. P has a particular abstract data schema in mind, and C has a compatible schema. Registry ensures that P encodes and transmits the information in a form that C understands.

The methods for applying patterns of information transfer and forms in which information are encoded may be defined either by local convention or by a wider convention. Local protocols may be "jargonised" versions of more widely-applicable protocols. In time, jargon may move from a satellite architecture such as that of a particular enterprise and become standardised in a wider setting such as the Web.

Applicability

Registry is applicable for REST architectures large and small. However, architectures with only a small number of components may not need a formal registry.

Structure

Registry Structure

Participants

Document Type
  • Provides a defined way to encode a given information schema
  • May have one or more parent types, whose parser is also appropriate to read this derived document type
  • Is defined in a Document Type Specification, including accommodation of document type evolution through must-ignore semantics on information that is not understood by processors.
  • May be a target encoding for a number of a number of different information schemas, including internal information schemas for various kinds of applications. For example, HTML can be used to encode information schemas as diverse as journal entry publication and warnings about severe weather events.
  • May act as a bridge between different Information Schema. For example, ODF is able to bridge between OpenOffice and Gnome Office internal document schemas.
  • Is defined to be independent of how it is transported, and orthogonal to Operations that are defined in the architecture.
  • Is developed using the least power principle: The least powerful language that is capable of expressing a set of information is used.
  • Minimises coupling by limiting reliance on local or domain-specific conventions.
Operation
  • Provides a way to transport information around the architecture
  • Corresponds to one or more Interaction Patterns that are understood by applicable information end-points
  • Is defined to be independent of the information it transports, and the specific endpoints it transfers information between. Operations are orthogonal to the set of URLs in the architecture.
Management Body and Process
  • Manages the evolution of Document Types and Operations
  • Oversees the adoption and uptake of new or updated Document Types and Operations in the architecture
  • May depend heavily on external bodies, especially those that manage the Web
  • Typically do not have the authority to upgrade any given component of the architecture. Instead, components are upgraded over time as their respective owners see fit in line with the Registry specifications.
  • Typically do not have any control over the set of URLs in the architecture

Collaboration

  • The Management Body and Processes manages the independent evolution of Document Types and Operations in the architecture. The set of URLs is not controlled by this body.

Consequences

The orthogonal nature of document types, operations, and URLs throughout the architecture allow for freedom of evolution. This separation and evolution is supported through the major patterns of the architecture as old and new components interact, including GET and PUT.

The balance of control and freedom is capable of delivering application-level forwards and backwards compatibility that lasts for a relative eternity in our industry. For example, HTML and HTTP have been able to continuously evolve over a time-frame spanning decades.

More domain-specific document types will likely have shorter lifespans as they develop from local conventions to a point of widespread global agreement. However, as critical mass is created a semantic web where machines can communicate generally based on widely-understood conventions is likely to emerge without specific coordination or intervention.

Implementation

Sample Code

Known Uses

The IETF defines a registry and change management process that includes a list of protocol interactions for document transfer (HTTP/1.1) and legal document types (the IANA).

Related Patterns