Terra Docs
Dashboard
  • Docs
  • API Reference
  • Changelog
  • Health & Fitness API
    • REST API Endpoints
    • Supported integrations
    • Event Types
    • Data models
    • Samples
    • Core concepts
    • Destinations
    • Mobile SDK
      • iOS (Swift)
      • Android (Kotlin)
      • React Native
      • Flutter
  • Streaming API
    • REST API Endpoints
    • Supported Integrations
    • Core Concepts
    • Websocket Reference
    • Mobile SDK
      • iOS (Swift)
      • Android (Kotlin)
      • Flutter
      • React Native
  • Teams API - Beta
    • Supported Integrations
    • Core Concepts
    • API Endpoints
    • Event types
Powered by GitBook
On this page
  • Data Stream
  • Producer
  • Consumer
  • Broker
  • Phone
  • Device
  • Data transfer Protocols

Was this helpful?

  1. Streaming API

Core Concepts

PreviousSupported IntegrationsNextWebsocket Reference

Was this helpful?

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 can pump data into, and multiple 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 (the TerraRT SDK in your mobile app) and distributing it to (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 .

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

  • Bluetooth Low Energy (BLE) - most popular

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

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

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

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

producers
consumers
producer connections
consumer connections
broker
producer
wearable
phone