Skip to content

Microservices, Java 8, Spring Boot, Hibernate, PostgreSQL

Notifications You must be signed in to change notification settings

didorg/ms_technology_1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Microservices

Java 8, Spring Boot, Hibernate, PostgreSQL

  • Store configuration details on cloud using CloudConfig.
  • Load balance requests between microservices using Ribbon.
  • Discover services in cloud using Eureka.
    • Ribbon with Eureka.
  • Increase resilience through Hystrix
    • Circuit Breaker pattern, Fail Silent approach.
  • Use asynchronous communication to improve performance.
    • hystrix-javanica: Asynchronous Execution.
  • Create a API gateway using Zuul.
  • Simplify REST calls through Feign.
    Implemented only to get restaurant-ms. RestTemplate is still used to get customer-ms.
  • Monitor microservices through Turbine, Sleuth and Zipkin.
  • Secure Config.
    • Spring Basic Authentication Securing Cloud Config Server.
    • Encrypt the sensitive values using Postman(Basic Auth and the value to encrypt), you need the key in the cloud-config-server.

External to ms_technology_1

CloudConfig


Inside ms_technology_1

Services

  • eureka-server
  • zuul-server

Microservices

  • order-ms
  • restaurant-ms
  • customer-ms

resturant (id, restaurantName, restaurantLocation)
customer (id, customerName, customerLocation)
order (id, orderNumber, restaurantId, customerId, createdAt)

A customer -> places an order -> to a restaurant

Suppose you are a driver and this is what you received to deliver an order to a client:

{
    "id": "101001",
    "orderNumber": "Ord-Nro-1",
    "createdAt": "2020-03-29T01:30:19.396+0000",
    "customer": {
        "id": "101302",
        "customerName": "Dan Jav",
        "customerLocation": "345 Beautiful Rd, Mercerville, NJ"
    },
    "restaurant": {
        "id": "1102",
        "restaurantName": "Sabor Cubano",
        "restaurantLocation": "12 Beautiful Rd, Mercerville, NJ"
    }
}

Basically you need to go to the restaurant location, pick up the order number and deliver it to the customer location