Giter Site home page Giter Site logo

jackshirazi / microservice-app-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nephel/microservice-app-example

0.0 1.0 0.0 10.92 MB

Example of polyglot microservice app

License: MIT License

Dockerfile 2.04% Go 9.29% JavaScript 51.27% HTML 0.30% Vue 20.86% Python 2.37% Java 13.87%

microservice-app-example's Introduction

How to instrument a polyglot microservices application with the Elastic APM

In this blog post we use an example application to demonstrate how to instrument a microservices application using the Elastic APM, with focus on Distributed Tracing.

Components

  1. Frontend part is a Javascript application, provides UI. Created with VueJS
  2. Auth API is written in Go and provides authorization functionality
  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.
  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

Take a look at the components diagram that describes them and their interactions.

picture

Why this fork

The original project instrumeted the example app using Zipkin. This fork used the Elastic APM

How to start

The demo uses the elastic stack on APM on ESS. If you don’t have an Elasticsearch Service account already, you can set up a trial one. It comes with an APM server included as default.

To get the example application running locally on our local machine and configure to send APM data to the Elasticsearch Service cluster. We need to clone the project i.e.

git clone https://github.com/nephel/microservice-app-example.git
cd microservice-app-example

Create a file called .env at the root directory of the project with the contents: vi .env` Adding the token and server URL values for the APM sever, that correspond to our environment.

TOKEN=XXXX
SERVER=XXXX

Use docker-compose:

docker-compose up --build

Then go to http://127.0.0.1:8080 for web UI.

Usernames/passwords are defined in microservice-app-example/auth-api/user.go as follows:

  • admin/admin
  • johnd/foo
  • janed/ddd

Contribution

This is definitely a contrived project, so it can be extended in any way you want.

License

MIT

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.