An open API service indexing awesome lists of open source software.

https://github.com/gfrancodev/mygrid

Gateway AWS IotCore to Mongodb. Real-time data transition.
https://github.com/gfrancodev/mygrid

aws-iot-core iot nodejs solid typescript

Last synced: 7 days ago
JSON representation

Gateway AWS IotCore to Mongodb. Real-time data transition.

Awesome Lists containing this project

README

          


MyGrid

Gateway AWS IotCore to Mongodb.

MyGrid

The Service captures any data payload sent directly by the Amazon AWS Iot Core and sends

it to a database in Mongodb. The transferred data can be displayed in real time on the terminal.


EXECUTION COMMANDS



npm run build = Transpilation with babel ts for js.

npm run dev = Run in development environment.

npx pm2-runtime dist/index.js = Running in production environment.

PERFORMANCE


MyGrid



The application proved to be promising, with low latency in the event loop,

low CPU and memory consumption at short, medium and long periods of use.

ENVIRONMENT



For easy manipulation of the script, without necessarily having to make direct contact

with the code when making a simple change. Everything that is necessary for proper functioning

must be inserted in the other environment variables :

Variable to define the time of receipt of data according to your zone:

Forgot you time Zone? View your time zone here.


TIMEZONE= Ex: America/Sao_Paulo





Variable to set connection URI with Mongodb:

MONGOO_URI= mongodb+srv://:G@server.mongodb.net/?retryWrites=true&w=majority



Variables to define the connection to AWS IOT CORE via MQTT server.

Not familiar with AWS IOT CORE? Meet here

**NOTE:** Files referring to certificates and authentication keys must be informed by their storage url.


IOT_CORE_CERTPATH_URL= Ex: https://www.exemple.com/certPath.txt
IOT_CORE_KEYPATH_URL= Ex: https://www.exemple.com/key.txt
IOT_CORE_CATH_URL= Ex: https://www.exemple.com/ca.txt
IOT_CORE_HOST= Ex: Your Custom Endpoint
IOT_CORE_CLIENT_ID= Ex: Your Unique ClientI dentifier
IOT_CORE_TOPIC= Ex: Your Topic




To monitor application status, PM2 is a service that allows us to do real-time monitoring.

If you don't have an account, create a PM2 account right now
Create an account here.


PM2_PUBLIC_KEY= Your Public Key
PM2_SECRET_KEY= Your Secret Key

DATABASE STRUCTURE


Very simple and dynamic structure, which allows accepting any data source provided by AWS Iot Core.



{
_id: Object Id
logs: Object that accepts any parameter
createdAt: Date Time ISO
}








Microservice powered by gfrancodev for Mygrid