Code Monkey home page Code Monkey logo

cloud-native-app-spring-boot's Introduction

Abstract

  • This repo represents a basic currency conversion cloud native-app which convert currency from given country code to targeted country code.
  • I am using the following stack for this cloud native app.
    • Microservice Architecture with API-GATEWAY along with Discovery Server
    • Spring Security with OAuth2 and KeyCloak Server
    • ELK Stack
    • Distributed Tracing
  • Following are the Tools and technologies which I am using:
    • Java 17
    • Spring Boot 2.6.4
    • Spring Cloud 2021.0.1 (Security, Config Server, Service Discovery and Distributed Tracing)
    • KeyCloak Server (Authorization Server) 16.1.1
    • Zipkin Version 2.23.16 (Distribute Tracing)
    • Rabbit MQ Version 3.9.13-management(Message Broker)
    • ELK Stack Version 7.17.1

Requirements

  • Add the line 127.0.0.1 auth-server in the last of your hosts file.
    • For Linux/Unix based system, its location is at: /etc/hosts
    • For Windows, its location is at: c:\Windows\System32\Drivers\etc\hosts
  • Docker 20.xx.x or later

How to Run: Watch Video

  • git clone https://github.com/UbaidurRehman1/Cloud-Native-App-Spring-Boot
  • cd Cloud-Native-App-Spring-Boot/envcn
  • ./run-multi-stage.sh (it will run all tools which our services needs such as keycloak server, discovery server, databases, zipkin, rabbitmq and elk-stack)
  • cd ..
  • ./run-multi-stage.sh (it will up the microservices)
  • Access Web Client UI
  • Access Swagger Client UI

About

  • This App basically converts a currency from given country code to targeted country code by following the cloud native approach.
  • api-gateway provides a gateway for end clients (web browsers, mobiles) to interact the resource servers (micro-services)
  • An Actor (React Client, React Native Client) can interact with the micro-services through the api-gateway
  • Micro Service Architecture
  • In above diagram, We can see:
    • An End Client can access the resource servers through the api-gatewy
    • There are five resource servers:
      1. currency-conversion service abstract the functions of getting exchange rate from currency-exchange service and converting this exchange rate by the help of math service.
      2. currency-exchange service return the exchange rate between two currencies.
      3. math service convert the currency to another currency using the exchange rate.
      4. country service return all countries
      5. user service is related about user information
    • An api-gateway exposes its URLs to Clients
    • Keycloak Server (For OAuth2 Authentication and Authorization)
    • Discovery Server (For services discovery)
    • Distributed Tracing Stack, for request tracing in micro-service architecture
    • ELK Stack, for Centralized Logging
    • Config Server to get distributed app configurations (hosted in github/public-repo) for each micro-service

Kibana Dashboard (For Centralized Logging)

Micro-Services

Servers

Config Repo

Note

cloud-native-app-spring-boot's People

Contributors

dependabot[bot] avatar ubaid4j avatar

Watchers

 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.