Giter Site home page Giter Site logo

microservicesdemo's Introduction

Microservices Demo

Simple microservices example with Java EE 7 and microprofile.

Description

This project is the code for the blog post I wrote. It's a Maven project containing sub-modules. Each sub-module is the microservice required to run. In a nutshell; suppose we're a nuclear plant and we're monitoring the temperatures of our two reactors. Along with the temperatures, we want to see the supervisor's name and the temperature they verified.

Sub-modules

Apollo and Artemis are the hypothetical reactors that expose their temperatures (just a random integer) at their REST endpoints.

Poseidon is another microservice that retrieves Apollo's temperature and adds the supervisor's name along with a timestamp.

Zeus is the user interface that gets the reactors' temperatures and the supervisor's name from Poseidon. It's written in JSF and Primefaces.

Run

You need Payara Micro to run the microservices. In a directory, put the Payara Micro jar and the generated .war files of the microservices. Deploy like so:

  • java -jar payaramicro.jar --deploy apollo.war --port 8383
  • java -jar payaramicro.jar --deploy artemis.war --port 8484
  • java -jar payaramicro.jar --deploy poseidon.war --port 8585
  • java -jar payaramicro.jar --deploy zeus.war --port 8989

Go to localhost:8989/zeus and that's it.

Todo

The project isn't finished. It needs work and I will continue to add functionallity and make it better.

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.