Skip to content

This project is implementation of microservice architecture trial.

License

Notifications You must be signed in to change notification settings

erensayar/Microservice-App-Demo

Repository files navigation

Development Continues

  • It is not the final state
  • Authority control structure is currently being developed

What this repository for?

This project microservice architecture implementation trying on spring cloud ecosystem.

Used Spring Cloud Modules

  • Config Server
  • Eureka Server
  • Spring Cloud Gateway
  • Spring Cloud Load Balancer
  • Hystrix
  • Admin Panel
  • Zipkin

Requirements

Architecture

Architecture

Working Principle

WorkingPrinciple

Auth Structure For Ms App

WorkingPrinciple

Logic

Logic

Entities Look Like These

Entities


Dockerizing Modules

In project root directory:

mvn docker:build

When you run this command

docker image ls

It should look like this

REPOSITORY TAG SIZE
ms-app-mis-account-service 1.0.0 256MB
ms-app-mis-account-service latest 256MB
ms-app-mis-product-service 1.0.0 256MB
ms-app-mis-product-service latest 256MB
ms-app-mis-notification-service 1.0.0 258MB
ms-app-mis-notification-service latest 258MB
ms-app-mis-campaign-service 1.0.0 258MB
ms-app-mis-campaign-service latest 258MB
ms-app-mas-hystrix-service 1.0.0 219MB
ms-app-mas-hystrix-service latest 219MB
ms-app-mas-eureka-service 1.0.0 219MB
ms-app-mas-eureka-service latest 219MB
ms-app-mas-admin-service 1.0.0 224MB
ms-app-mas-admin-service latest 224MB
ms-app-mas-config-service 1.0.0 220MB
ms-app-mas-config-service latest 220MB

Delete All Created Images

docker rmi $(docker images | grep 'ms-app-')

Done

  • MS Structure (MAS)
  • Feign Communication
  • Query Communication
  • Business (MIS)
  • Dockerizing Modules

TO-DO

  • Gateway improvement with spring cloud gateway
  • Load Balance improvement with spring cloud load balancer
  • Config server encryption-decryption
  • Hot config update (refreshcope etc..)
  • Admin server duplicate instance?
  • Auth server

  • Mail notification implementation
  • Phone notification implementation
  • Phone notification simulation

DB URL

  • User : jdbc:h2:mem:account-db
  • Product : jdbc:h2:mem:product-db
  • Notification : jdbc:h2:mem:notification-db
  • Campaign : jdbc:h2:mem:campaign-db

Test Data

(These are not necessary for now)

ACCOUNT

ID EMAIL NAME PHONE SURNAME
1 account1@mail.com account-1-name +905552223344 account-1-surname
2 account2@mail.com account-2-name +905552223344 account-2-surname
3 account4@mail.com account-3-name +905552223344 account-3-surname
4 account4@mail.com account-4-name +905552223344 account-4-surname
5 account5@mail.com account-5-name +905552223344 account-5-surname

Product

ID DESCRIPTION NAME
1 Product-1-Description Product-1
2 Product-2-Description Product-2
3 Product-3-Description Product-3
4 Product-4-Description Product-4
5 Product-5-Description Product-5

Microservice Utility Modules SS

Eureka

Eureka

Admin Server

AdminServer AdminServer AdminServer

Zipkin

Zipkin Zipkin Zipkin images/ RabbitMqManager

RabbitMqManager


Tags

  • spring cloud microservice example
  • microservice example
  • api gateway example
  • spring cloud gateway example
  • load balance example
  • spring cloud load balancer example
  • config server example
  • eureka server example
  • admin server example
  • zipkin example