Coder Social home page Coder Social logo

fang-zhang / microservice-app-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elgris/microservice-app-example

0.0 0.0 0.0 2.65 MB

Example of polyglot microservice app

License: MIT License

JavaScript 51.18% Python 3.40% Java 13.51% Go 11.24% HTML 0.30% Vue 18.80% Dockerfile 1.58%

microservice-app-example's Introduction

Example microservice app

This is an example of web application comprising of several components communicating to each other. In other words, this is an example of microservice app. Why is it better than many other examples? Well, because these microservices are written in different languages. This approach gives you flexibility for running experiments in polyglot environment.

The app itself is a simple TODO app that additionally authenticates users. I planned to add some admin functionality, but decided to cut the scope and add it later if needed.

Components

  1. Frontend part is a Javascript application, provides UI. Created with VueJS
  2. Auth API is written in Go and provides authorization functionality. Generates JWT tokens to be used with other APIs.
  3. TODOs API is written with NodeJS, provides CRUD functionality ove user's todo records. Also, it logs "create" and "delete" operations to Redis queue, so they can be later processed by Log Message Processor.
  4. Users API is a Spring Boot project written in Java. Provides user profiles. Does not provide full CRUD for simplicity, just getting a single user and all users.
  5. Log Message Processor is a very short queue processor written in Python. It's sole purpose is to read messages from Redis queue and print them to stdout
  6. Zipkin. Optional 3rd party system that aggregates traces produced by other components.

Take a look at the components diagram that describes them and their interactions. microservice-app-example

Use cases

  • Evaluate various instruments (monitoring, tracing, you name it): how easy they integrate, do they have any bugs with different languages, etc.

How to start

The easiest way is to use docker-compose:

docker-compose up --build

Then go to http://127.0.0.1:8080 for web UI. Zipkin is available on http://127.0.0.1:9411 by default.

Contribution

This is definitely a contrived project, so it can be extended in any way you want. If you have a crazy idea (like RESTful API in Haskell that counts kittens of particular user) - just submit a PR.

License

MIT

microservice-app-example's People

Contributors

elgris avatar orasik avatar ilyeshammadi avatar madnax1337 avatar opchaves 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.