GithubHelp home page GithubHelp logo

mark-dudu / microservices-hello-world Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bluerei/microservices-hello-world

0.0 0.0 0.0 487 KB

'Hello World' Application with Spring Boot Microservice Stack

License: Apache License 2.0

Java 100.00%

microservices-hello-world's Introduction

'Hello World' Application with Spring Boot Microservice Stack

This is simple microservice application designed to illustrate the basic concept of Microservice Architecture and to provide a starting point for future development of any business application.

Requirements

This microservice application produces a 'Hello World' messages in JSON format. The second part of the message is replaceable and configurable based on a value in the property file. For example, if the property file is updated and the word 'World ' is replaced with 'Java', the service starts producing 'Hello Java' message.

Solution

'Hello World' microservices

The business logic is located in two Microservices:

Microservice Name Location Description
HelloWorld Service /helloworld_service The main service. It receives client requests, calls GetName service to get the second part of the greeting message, builds the whole message and returns it to the client in JSON format.
Note: A Circuit Breaker is used in the GetName call.
GetName Service /getname_service Provides the second part of the 'Hello World' message from /config_dir/getname-service.properties file.

This implementation is based on Spring Boot v2.2.2 and Spring Cloud Netflix frameworks.

Deployment

There are several ways to deploy these microservices. The easiest way is to run them on a local machine as normal Java applications.

Here is preferable order to start these microservices with user interface or endpoint URLs:

Microservice Name Location Access URL Description
Discovery Service (Eureka) /eureka_service http://localhost:8761/ Provides registration, discovery and load balancing functionality for the other microservices.
Config Service /config_service N/A Provides microservices with externalized configuration information.
Admin Service /admin_service http://localhost:8080/ Provides a user interface for for managing and monitoring all microservices within the stack.
GetName Service /getname_service http://localhost:8887/ Functional microservice. Retrieves the second part of the 'Hello World' message.
HelloWorld Service /helloworld_service http://localhost:8886/ The main functional microservice. Produces a 'Hello World' messages in JSON format. This endpoint URL is accessible from within the microservices stack.
Gateway Service /gateway_service http://localhost:9000/ Provides an access to HelloWorld Service endpoint from outside of microservices stack. Usually, for security reason the only open port in the firewall is the port of the Gateway Service.

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.