Core Concepts

Data Stream

The continuous flow of heart rate data from the user's wearable device. The data moves through Terra's system and reaches the developer's backend in real time via a WebSocket connection. As long as the connection is open, the data keeps coming without needing to ask for it again.

Think of it like a pipe, to which multiple producers can pump data into, and multiple consumers can connect to in order to receive that data.

Producer

The producer is the Terra Real-Time SDK, which collects heart rate data (or other supported data types) from the wearable device and sends it to Terra’s API. It connects to the wearable using technologies like Bluetooth and ensures the data is constantly transmitted.

Consumer

Your system that receives the heart rate data from Terra’s API. Once connected, it gets the data in real time and can use it in the app, display it to users, or store it for later use.

Broker

In the context of Terra API, the broker is the intermediary that manages the real-time data stream between producers and consumers.

Terra API acts as the broker by receiving data from producer connections (the TerraRT SDK in your mobile app) and distributing it to consumer connections (e.g., your application’s backend).

Phone

In the context of this documentation, an Android/iOS device will be referred to as a phone. This will be an iOS or Android phone which connects to a streaming wearable, and sends data to the broker.

You can think of the device itself as being a producer for all intents and purposes.

Device

For all intents and purposes throughout this documentation, a device will be any wearable capable of streaming data through either a BLE or ANT+ connection.

If the wearable is a Watch OS, Apple Watch, or Samsung wearable (which have a special connection & data streaming process), this will be explicitly made clear

Data transfer Protocols

These are means by which a wearable will transfer data to a user's phone, and can take one of the following forms.

  • Bluetooth Low Energy (BLE) - most popular

  • ANT+ - allows one-to-many broadcasting of data

  • Custom Bluetooth protocols (Apple Watch, WatchOS, Samsung Watch...)

Was this helpful?