Skip to content

cealer/microservices-demo

Repository files navigation

Microservices demo with event driven architecture to the services communication

The purpose of this project is to show the communication between microservices.

Architecture

Architecture

Getting Started 🚀

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on production enviroment.

Prerequisites 📋

Docker

Installing 🔧

Build the services

docker-compose build

Run services

docker-compose up -d

You need to wait like 1 min because rabbitMQ is starting

Prediction salary service

Make a salary prediction with a post to http://localhost:5000/predictions with a body like:

 {
	"experience":[10]
 }

Every time that you make a prediction, the service, save that response as a cache in redis.

History service

Every time prediction salary service is called, this service save that action like a record. You can get all the records with a get in

http://localhost:61945/Records

Stop and remove the services

docker-compose down

Angular Client

Open Angular client

http://localhost:8888

Angular client

To do

  • Api gateway
  • Authentication
  • ssl

Deployment 📦

docker stack deploy  -c docker-compose.prod.yml --with-registry-auth salary-app

License 📄

This project is licensed under the MIT License - see the LICENSE.md file for details