Giter Site home page Giter Site logo

bolanasr / vehicles-monitor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andrewayoub/vehicles-monitor

0.0 2.0 0.0 470 KB

A distributed system to monitor vehicles

Dockerfile 3.45% Python 32.68% Shell 1.24% CSS 57.39% JavaScript 3.01% HTML 2.23%

vehicles-monitor's Introduction

Vehicles-Monitor

A distributed system to monitor vehicles status.

Build Status

live Demo

Technology stack

How to run

To run the full system just use docker-compose:

docker-compose up 

for steps to run each component separately please see the docs of each component

Problem definition

You are working to company which has a number of vehicles belongs to a number of customer, They have a need to be able to view the status of the connection among these vehicles on a monitoring display The vehicles send the status of the connection one time per minute. The status can be compared with a ping; no request from the vehicle means no connection so vehicle is either Connected or Disconnected.

Architecture

architecture

This solution is composed of three main components

  • Monitoring Service:
    A service is responsible for:
    1- Receives a ping from the vehicle (or the simulator)
    2- Keeps the last up time for each vehicle in a redis db
    3- Returns the vehicles ids with its state (whether seen in the last minute or not)

  • Website Service: A service is responsible for serving the website and currently it has only 2 routes:
    1- (/): serves the dashboard website containing a table of the vehicles and its state 2- (/vehicles): a restful endpoint with no params returns the full list of vehicles and gets the status from the monitoring service

  • Simulator Service: This service is responsible for simulating pings from vehicles, eah minute this service sends ping to the monitoring service, it decides randomly if it will or wont send a ping for each vehicle

Scalability

This solution is designed for scalability, each component can be horizontally scaled.

vehicles-monitor's People

Contributors

andrewayoub avatar

Watchers

James Cloos avatar Bola E.Nasr 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.