Share Data & Follow Feeds

IOTICS is all about sharing data in real-time or as and when data becomes available. Digital Twins publish data through one or more data feeds, and they can at the same time follow one or more data feeds from one or more other Digital Twins to retrieve their data as well.

This page explains how a Digital Twin publishes (shares) data, as well as follows (receives) data from another Digital Twin.

Introduction to Sharing Data

In IOTICS, data sharing only happens through and between Digital Twins. These connections are called "brokered interactions" or "twin-to-twin interactions". A Digital Twin can publish data through one or more data feeds, as well as follow one or more data feeds from one or more other Digital Twins.

In essence, IOTICS data ecosystems and networks are created by Digital Twins exchanging data with one another.

Digital Twin types

Depending on whether a Digital Twin is publishing and/or following data, we distinguish between the following types:

  • Publisher: a Digital Twin that publishes data via one or more data feeds;
  • Follower: a Digital Twin that follows one or more data feeds from one or more Digital Twins;
  • Synthesiser: a Digital Twin that is both a Publisher and a Follower, and concurrently publishes and follows one or more data feeds.

Historical data in IOTICS

It is important to note that IOTICS is all about streaming data. We don't store historical data. Only a Digital Twin's metadata properties are stored in order to enable search.

This implies that, by default, all data shared through a data feed will be lost unless another Digital Twin follows, uses or stores it. Only the latest shared Value of a Digital Twin Publisher's Feed can be retrieved if - and only if - the Digital Twin Publisher's Feed has the storeLast parameter set to True.

If you are interested in an example on how to follow a set of Twins' Feeds and store data using IOTICS, have a look here.

How to share data through a Digital Twin's data Feed

Consider the following points when creating a Digital Twin Publisher:

  1. A Digital Twin can only publish data through a data feed. Therefore, a Feed and a Value must first be created for that Twin;
  2. The data to be shared needs to be encoded as base64;
  3. The data must always include a dictionary made up of the Value Label(s) as key(s) and the actual data as value(s);
  4. Consider building a code application ("Publisher Connector") to continuously retrieve data from outside IOTICS and share it via the Twin's Feed.
1. Create a Digital Twin with a Feed and a Value
2. Encode the data to share into a Base64 format
3. Create the json payload made up of the encoded data, mime type and timestamp
4. Use the Share Feed Data API call

To see an example on how to create a Twin that shares data via a Feed, have a look:

  • here, with the gRPC Client Library;
  • here, with REST.

How to follow a Digital Twin's data feed with the IOTICS API

Consider the following points when creating a Digital Twin Follower:

  1. Check whether you're allowed to access (= follow) data from a specific Digital Twin, as your access may have been restricted. For more details on how to update access permissions go to Selective Sharing for Metadata and Data. As a rule of thumb:
    • Data feeds from your own local Twins (e.g. Twins that are in the same IOTICSpace as the Twin Publisher) can always be followed,
    • Data feeds from remote Twins (e.g. Twins in a different IOTICSpace than the Twin Publisher) can only be followed if the access permissions have been enabled;
  2. Data from a Feed needs to be decoded from base64;
  3. Consider building a code application ("Follower connector") to continuously follow data from a Twin's Feed and execute an action outside IOTICS (e.g. storing the data into a database or activating a physical sensor).
1. Create a Digital Twin
2. Get Twin DID and Feed ID of the Twin's Feed to follow
3. Use the Follow Feed API
4. Decode the data received from Base64 format

To see an example on how to create a Twin that follows Feed's data, have a look:

  • here, with the gRPC Client Library;
  • here, with REST.