Distrix Model: Organizing Object Instances

A model is an organizational structure for object instances, in which nested subdirectories provide you with a familiar structure in which to work, similar to a normal file system's directory structure. As you build your Distrix system, each time you have an agent publish an object, you also specify the location in the model where the object instance will be published.

The purpose of utilizing a hierarchical model for object publication is twofold:

Distrix Model as Object-oriented Overlay

The Distrix model provides an object-oriented overlay that abstracts the underlying communication protocols and channels in the distribution of data among application components. From a designer's point of view, Distrix presents one or more physical networks as a single, logical network, which allows the designer to focus on the production and consumption of data rather than deal with the complex task of transporting data. Although a Distrix network is still subject to the properties of the underlying communications channels, including bandwidth and latency limitations, Distrix provides static and run-time interfaces to configure how these underlying channels are connected and used.

Implementing the object-oriented overlay is the Distrix Objects Service, which provides interfaces for object definition (such as its member variables and functions), publication of object instances, and subscription to object instances. To determine the relationships between publications and subscriptions, the Objects Service uses the structure of the Distrix model, which can be visualized much like a folder tree structure, although it is not literally composed of files and folders. This folder-like model structure can be pre-configured at design time or, for dynamic systems, configured at run time; the structure of the information model is completely up to the system designer.

The information model is composed of paths indicating where certain objects are published within the model, so one can think of the paths as analogous to uniform resource identifiers — they identify the location to which information is published and from where information is subscribed. All manner of logical groupings can be achieved by publishing and subscribing to the appropriate model paths.

When designing a Distrix system the primary tool is Distrix System Builder. This tool enables the designer to define:

There are three levels of increasing design flexibility that can be employed by the designer.

All three of these approaches can be mixed and matched within a single Distrix system depending upon requirements.

Named and Anonymous Objects

Model nodes not only lend structure to your project, but also allow for subscription to objects within a model node. The model allows for two types of object instance: named and anonymous.

Limitations and Best Practices

While designing your model structure, keep these limitations in mind:

Suggestions for best practices:

Example 1: Temperature Regulation System

The Temperature Regulation System Tutorial provides a simple example of how you can utilize the model structure for a small project. In the tutorial, agents publish three objects:

These three objects can be sorted into two model nodes:

A subscription to the object type TemperatureValue in /Sensors/ without specifying a specific instance allows an agent to read any TemperatureValue object in that location.

Example 2: Driving Robots

If you had a set of robots that have similar driving characteristics, each robot could have a copy of a driving agent. To control that agent you would publish new speed and turn rate data for that robot.

Where there are two robots, RobotA and RobotB, each node contains the objects Speed and TurnRate:

In this way, each driving agent can subscribe to the speed and turn rate objects in the model node that is specific to that robot.

See Also