Instance
An instance is a unique element within a Topic, described by unique values of key fields.
Instances represent individual real-world objects within a single data stream. For example, you can represent individual radar tracks within a single "TrackData" topic, or individual components of a wind turbine within a "TurbineComponentState" topic. What constitutes an instance will be different depending on what you are representing in your Topic.
Some examples of instances you can represent in data:
- Unique vehicles in a "Vehicle Position" topic
- Unique applications in an "Application State" topic
- Unique temperature sensors in a "Temperature" topic
Modeling your data with unique instances gives you several advantages, including:
- Scalability when representing many thousands of objects - you can use a single DataReader to receive the state of all the instances within a topic
- Quality of Service applied per-instance: Some quality of service behaviors are applied per-instance. For example, the HISTORY QoS is applied per-instance, which allows you to store a certain number of updates for every instance. Note that you cannot specify different QoS for specific instances within the same DataWriter or DataReader. The QoS is set on the writer or reader, and applied on each instance. A description of all QoS, including information on which QoS policies are applied per-instance is here.
- Life-cycle information is available for instances: A receiving application can detect whether an instance is alive or not. A sending application can change the instance state.
- Efficient filtering of data by key fields: If you are only interested in receiving updates about certain instances, you can set up a content-filter for certain values of the key fields. This filtering is particularly efficient if you are only filtering on key fields.