Giter VIP home page Giter VIP logo

microservices-sample's Introduction

Microservices Sample

Build Status Docker Repository on Quay Docker Repository on Quay Docker Repository on Quay Docker Repository on Quay Docker Repository on Quay

NOTE

This repository is no longer maintained. Please refer https://github.com/microservices-sample for latest enhancements.

What is it?

"Microservices", a trending buzz word nowadays. What problems does it solve?

Many organizations nowadays are driving the technology migrations and one of the biggest challenges is to migrate from monolithic application to micro-services based application.

This mircoservices-sample project demonstrates how multiple services run independently leveraging on the best microservices patterns to enable scale, performance and resilience.

https://www.youtube.com/watch?v=AYcsnuIOW2M

Use case

The sample application has three services namely service-one, service-two and service-three. Each of the service has its own database service-one-db, service-two-db and service-three-db respectively. During the startup of the services, it persists the service name and an auto generated UUID in its perspective database and sends the data to the RabbitMQ exchange which then broadcasts the data to all the queues based on the routing key. Every microservices listens to its own RabbitMQ queue and keeps updating the database as and when it receives the data.

Below are the screens of the application.

alt tag

Clicking on the tab's one, two or three the data that you see on the screen is based on the data fetched by the respective service by calling its database.

alt tag

Notice that the UUID generated for service-one which lies in service-one-db is in sync with service-two and service-three tabs which is achieved by RabbitMQ (asychronous communication between microservices).

alt tag

alt tag

Service Registration

During the initialization of a service, it would get registered to the discovery and registration server (which in our example is Hashicorp's Consul).

alt tag

Service Discovery

When one service (say api-gateway) needs to access a resource from another service (say service-one), all it has to do is ask discovery and registration server (Consul) to give one of the service-one's instance information.

alt tag

Architecture

Below is the architectural diagram for microservices sample project.

alt tag

Technology

Microservices sample project uses a number of open source projects to work properly:

Tools

Development

Below are the steps to bring up the development environment and get started.

  1. Install Git, Java, Maven and Docker
  2. For the project using https://github.com/vmudigal/microservices-sample.git
  3. Clone the fork using https://github.com/{YOUR_GIT_ID}/microservices-sample.git
  4. Execute "cd /microservices-sample/build/docker/scripts/"
  5. To deploy docker please run "./deploy.sh docker".
  6. Access the Application at http://localhost/

Help

Feel free to reach "[email protected]" incase of any concerns.

microservices-sample's People

Contributors

vmudigal avatar

Stargazers

Muharrem Okutan 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.