Integrate TDengine with Perspective

Joel Brass

June 12, 2025 /

This article demonstrates how to integrate TDengine with Perspective for real-time stream analytics.

Video

TDengine–Perspective Demo

You can explore the visualization options provided by Perspective in this demonstration environment.

Ingestion and visualization workflows in the demo environment

Prerequisites

Procedure

  1. Clone the perspective-examples repository from GitHub to your local machine and open the examples/tdengine/node directory.

    git clone https://github.com/ProspectiveCo/perspective-examples
    cd examples/tdengine/node
  2. Run the provided script to start TDengine in a Docker container:

    ./docker.sh
  3. Install Node.js dependencies:

    npm install
  4. Run the producer script to create a database and table in TDengine and insert simulated data in real time:

    node src/producer.js
  5. Run the server script to construct a Perspective WebSocket server and a Perspective table:

    node src/server.js
  6. Host the Perspective front-end with Vite.

    npm run dev
  7. Open the URL of the Vite development server in a web browser. The default URL is http://localhost:3000.

You can now visualize the sample data in your browser as shown in the following figure.

  • Joel Brass
    Joel Brass

    Joel Brass is a Solutions Architect at TDengine, bringing extensive experience in real-time data processing, time-series analytics, and full-stack development. With a 20 year background in software engineering and a deep focus on scalable applications and solutions, Joel has worked on a range of projects spanning joke databases, IoT, self-driving vehicles, and work management platforms. Prior to joining TDengine, Joel worked in Advisory Services for Enterprise customers of Atlassian and the Systems Engineering team at Waymo. He is currently based in the San Francisco Bay Area.