Code Monkey home page Code Monkey logo

fleetman's Introduction

Fleetman

Fleetman application simulates the monitoring of a fleet of trucks. The application generates geo positioning data for each truck, stores this data either in memory or in the database (Couchbase), and feeds location data into a convenient map-based web UI where we could see the latest position of each truck, its speed and a current journey. The original source code for this application can be found here: https://github.com/DickChesterwood/k8s-fleetman. I put a blog article describing Fleetman's architecure and migration to Couchbase. It can be found here: https://blog.couchbase.com/refactoring-spring-microservices-application-to-work-with-couchbase/

I made the following changes:

  1. Upgraded the version of Spring Boot 1.5.2 to 2.2.1;
  2. Replaced Mongo persistence storage implementation with Couchbase;
  3. Added speed calculation for the database version of the application;

Fleetman has been tested locally on my Mac with 16GB of RAM and 6 CPU cores configuration.

To run the app locally:

  1. Install and run Apache ActiveMQ.
  2. Install and run Couchbase, configure the bucket, setup the RBAC user with the same name as a bucket and grant it bucket permissions. Add 2 secondary indexes on name and timestamp.

CREATE INDEX ix_name ON test(name);

CREATE INDEX ix_timestamp ON test(timestamp);

  1. Compile Java modules for position tracker, position simulator and api-gateway. Run each of the .jar files produced.
  2. Compile and Run the front-end Angular app with the following command:

npm start

That should bring up the map on localhost:4200 showing each truck's location, last seen time and speed.

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.