Skip to content

Commit

Permalink
Update link URL and create a IoTDB connection using the IoTDB Handler
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Muehlbauer <[email protected]>
  • Loading branch information
chrizmc committed Jul 24, 2024
1 parent 3e36432 commit 72ab98b
Show file tree
Hide file tree
Showing 9 changed files with 23,778 additions and 18 deletions.
9 changes: 9 additions & 0 deletions cdsp/information-layer/handlers/iotdb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Node.js
node_modules/
package-lock.json

# Credentials Config File
config.js

# MAC
**/.DS_Store
39 changes: 38 additions & 1 deletion cdsp/information-layer/handlers/iotdb/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
tbd
This directory contains the IoTDB Handler as a Node.js application. As [Apache IoTDB](https://iotdb.apache.org/) is a time-series database, the IoTDB Handler connects to an existing IoTDB instance using the Thrift protocol. The handler utilizes the [IoTDB Thrift API](https://github.com/apache/thrift) to communicate with the database and perform operations. Configuration details, such as the IoTDB host, port, user credentials, and time zone, are specified in the handler's configuration file. The IoTDB Handler is designed to manage sessions, execute queries, and interact with the IoTDB instance efficiently during runtime.

# Features

- **Authentication**: Authenticates with IoTDB using the IoTDB host, port, user credentials, and time zone.
- **Error Handling**: Logs and handles errors during database operations and synchronization.

# Installation

Execute within `iotdb` directory

```bash
npm install
```

# Configure IoTDB

Before the Database-Router can start the IoTDB Handler without any errors you need to start and run Docker containers defined in a [Docker Compose file](/docker/).

## Configure of a IoTDB Handler

Create `config/config.js` with the following format, replacing the app id and the api key with yours.

```js
module.exports = {
iotdbHost: "your-iotdb-host", // Default "localhost"
iotdbPort: 6667, // Set this to the appropriate IotDB Port
iotdbUser: "your-iotdb-user", // Default "root"
iotdbPassword: "your-iotdb-password", // Default "root"
timeZone: "UTC+2", // Set this to the appropriate time zone
};
```

> **_IMPORTANT:_** Do not commit this file to github!
## Starting the IoTDB handler

You do not need to start IotDB Handler manually. It is started by the DB-Router like described [here](../../router/README.md#Run).
Loading

0 comments on commit 72ab98b

Please sign in to comment.