Coder Social home page Coder Social logo

mygrid's Introduction

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://:[email protected]/?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

mygrid's People

Contributors

gfrancodev avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.