Skip to content

tmuzzillo/microservices-products-new

Repository files navigation

Products Microservices Project

Microservices to manage products like a Shopping App. We are going to use Spring framework such as: Spring Data, Spring Web, Spring Boot, Spring Cloud.

Modules:

  • Product Service: Create and view Products, acts as Product Catalog.
  • Order Service: Can order Products.
  • Inventory Service: Can check if product is in stock or not.
  • Notification Service: Can send notifications after order is palced.

Architecture:

Order Service, Inventory Service and Notification Service are going to interact with each other. With Synchronous and Asynchronous communication.

arquitectura productos shopping

REST

rest

Spring Cloud Environment

As we cannot ping to an static IP of the services running because they are running with an dinamic IP in cloud environment, we are going to implement a discovery-server pattern to be able to communicate our services. To do that we are going to use Netflix Eureka integration.

Discovery service apttern

Communication in our cloud environment implementing discovery-server pattern

We register our Discovery Service as a "server" and ours other services as "clients". Each client can have a registry of the address of the service that we want to reach in case of the Discovery Service were down.

communication discovery service

client registry

API Gateway

Gateway: Responsable of route the requests from users to the correspond services API gateway

Security - Keycloak

Gateway securing with keycloak, all services needs a token to receive requests and we need credential to enter to eureka configuration.