https://github.com/benmeehan/iot-cloud
A collection of event-driven Golang microservices to manage, monitor, command, update and store IoT device data in TimescaleDB, integrated with the IOT Agent.
https://github.com/benmeehan/iot-cloud
cloud golang iot iot-platform mqtt time-series timescaledb
Last synced: 3 months ago
JSON representation
A collection of event-driven Golang microservices to manage, monitor, command, update and store IoT device data in TimescaleDB, integrated with the IOT Agent.
- Host: GitHub
- URL: https://github.com/benmeehan/iot-cloud
- Owner: BenMeehan
- License: apache-2.0
- Created: 2024-09-06T09:36:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-15T15:25:11.000Z (9 months ago)
- Last Synced: 2025-01-15T17:29:22.791Z (9 months ago)
- Topics: cloud, golang, iot, iot-platform, mqtt, time-series, timescaledb
- Language: Go
- Homepage:
- Size: 68.6 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IOT - Cloud
IOT Cloud is a collection of Golang microservices that operate as event-driven systems, designed to work seamlessly with the IOT Agent to command, monitor, and track devices.
Pre-Alpha Discussions: [Here](https://github.com/BenMeehan/iot-cloud/discussions/5)
## Services
### Heartbeat Service
This service receives device heartbeats through MQTT and stores them in TimescaleDB.### Authentication Service
It authentices the device, validates device secrets and generates JWT for device. It also supports token invalidation using refresh tokens.### Registration Service
This service listens for device registration requests over MQTT, generates unique device IDs, and stores device information in a PostgreSQL (TimescaleDB) database.### Metrics Service
This service collects and processes system and process metrics from IoT devices via MQTT. It stores the collected metrics in TimescaleDB for monitoring and analysis.### Command Service
This service listens for HTTP requests to execute commands on IoT devices via MQTT. It publishes the commands to the respective device and waits for a response, returning the output back through HTTP.### Location Service
This service tracks the real-time geographical location of IoT devices using MQTT. Devices publish their location (latitude, longitude, accuracy) at regular intervals. The service stores this location data in TimescaleDB for tracking and analysis. It can also process GPS coordinates from external APIs (e.g., Google Maps API) when needed.### SSH Service
This service facilitates secure, reverse SSH connections to IoT devices via MQTT. It allows users to: Request access to device ports by specifying the device ID and remote port. The SSH Service ensures scalability to handle multiple users, devices, and ports across distributed server instances.## Data Storage:
The services store data in TimescaleDB tables, optimized as a hypertable for efficient querying and analysis of time-series data.## Running the Project
To run the project, execute:
```bash
go run cmd/main.go
```## To Add a New Service
1. Create a new folder at the root of the project and add your service there.
2. Follow the folder structure of the other projects---
This project is licensed under the [Non-Commercial Software License 1.0](./LICENSE.md).