0% found this document useful (0 votes)
38 views15 pages

Ecommerce Microservices

The document outlines an e-commerce project utilizing a Node.js microservices architecture, employing RabbitMQ for asynchronous communication and MongoDB for data management. It details various microservices, including Authentication and Product services, and highlights the use of gRPC for efficient inter-service communication. Additionally, it introduces the Google Microservice Demo and Micro Marketplace, showcasing their respective technologies and functionalities in building scalable e-commerce applications.

Uploaded by

m.erd2001gfb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views15 pages

Ecommerce Microservices

The document outlines an e-commerce project utilizing a Node.js microservices architecture, employing RabbitMQ for asynchronous communication and MongoDB for data management. It details various microservices, including Authentication and Product services, and highlights the use of gRPC for efficient inter-service communication. Additionally, it introduces the Google Microservice Demo and Micro Marketplace, showcasing their respective technologies and functionalities in building scalable e-commerce applications.

Uploaded by

m.erd2001gfb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Node.

js E-commerce
Google Microservice Demo
Micro Marketplace

05190000109 Mehmet Erad


05190000085 Uğur Budanoğlu
05190000053 Doğukan İnce
Node.js
E-commerce
This e-commerce project features a Node.js
based microservices architecture. We use
AMQP with RabbitMQ for asynchronous
communication between services, while
MongoDB and Express.js handle data. Docker
simplifies deployment and scaling,
encapsulating each microservice in its own
container for portability, isolation, and
consistent deployments. The architecture is
fully containerized, with each microservice,
the API Gateway, and RabbitMQdistributed as
Docker images.
Services
Services encapsulate the core business logic and represent
a microservice's fundamental functionality.
Repositories
Repositories manage data access and storage operations
for a microservice.
Models
Models define the data structures and business entities
used within the microservice. They represent domain-
specific objects and hold their associated properties and
behaviors.
Controllers
Controllers receive and process incoming requests from
clients or external systems.
Middlewares
Middlewares are software functions that process requests
and responses at various stages of the request-response
cycle. pipeline and enhance the overall behavior of the
microservice.
Services Authentication Microservice
The Authentication microservice handles user authentication and
authorization processes. It ensures that only authorized users can
access protected resources within the application.

Product Microservice
The Product microservice is responsible for managing product-related
information, such as details, inventory, and pricing. It provides APIs for
retrieving product information, adding new products, and updating
existing ones.
Inter-Service gRPC for Inter-Service Communication
In this project, gRPC is the chosen protocol for inter-service
communication. Developed by Google, gRPC is an open-source Remote

Communication Procedure Call (RPC) framework. It enables a service or a remote server


to call a method as if it were a local method within its own service,
facilitating fast and straightforward client-server communication.
gRPC is specifically designed for high-performance and efficient
communication in service-oriented applications, offering language and
platform independence. Its significant performance boost, up to 8 times
faster than REST, comes from features like HTTP/2 support and binary
serialization.
This communication can be established in four distinct ways:
Unary: A single request is sent, and a single response is received.
Server Streaming: The server continuously streams responses to the
client.
Client Streaming: The client continuously streams requests to the
server.
Bidirectional Streaming: Both the client and server continuously
stream requests and responses to each other.
Google Microservice Demo
Online Boutique is a cloud-native
microservices demo application designed by
Google. It's a web-based e-commerce
platform where users can browse items, add
them to a cart, and make purchases.
This project featuring 11 microservices built
with a mix of different technologies and
programming languages. Google using a
suite of Google Cloud products, including
Google Kubernetes Engine (GKE), Anthos
Service Mesh (ASM), gRPC, Cloud Operations,
Spanner, Memorystore, AlloyDB, and Gemini.
A key advantage of Online Boutique is its
ability to run on any Kubernetes cluster.
Services
Inter-Service Products and Orders

1.The Products microservice publishes the order details to the Order

Communication queue in RabbitMQ. This step ensures that the Order microservice
can consume and process the order.
2.The Order microservice listens for messages from the Order queue.
Upon receiving a message, it consumes the order details,
consolidates prices and products, and creates a new order in the
database.
3.Once the order is created, the Order microservice publishes the
products associated with the order to the Products queue. This step
validates the successful order and allows the Products microservice
to retrieve the order details.
4.The Products microservice listens for messages from the Products
queue. When a message is consumed, it retrieves the order details
and returns them as a response body to the /products/buy
endpoint call.
Micro
Marketplace
Micro Marketplace is a robust e-commerce
application built on a microservices architecture
using Spring technologies and other open-
source tools.
This platform leverages the power of Spring
Boot, Netflix Eureka, Spring Cloud Gateway, and
KeyCloak for service development, discovery,
gateway management, and security,
respectively.It incorporates Resilience4j for
resilient synchronous communication, and
Apache Kafka for seamless event-driven
asynchronous communication between
services.It offers extensive observability into the
application using Micrometer and Zipkin for
distributed tracing, and Prometheus and Grafana
for monitoring and visualization.With a focus on
scalability, resilience, and real-time interaction,
Micro Marketplace provides a robust foundation
for creating feature-rich online marketplaces.
Services Product Service
Responsible for managing product information, including creation,
retrieval, and updates. It uses a MongoDB database.

Order Service
Handles order management, including creating and retrieving orders. It
uses a MySQL database.

Inventory Service
Manages products inventory. It also uses a MySQL database.

Notification Service
A stateless service responsible for sending notifications to users
regarding their orders or other relevant updates.
Major Discovery Server: Netflix Eureka is employed for service registration
and discovery, allowing microservices to locate and interact with
each other dynamically.

Components
API Gateway: Spring Cloud Gateway is deployed to serve as the entry
point for all external requests, effectively routing traffic to the
appropriate microservices.
Auth Server: For robust authentication and authorization
mechanisms, KeyCloak is used to secure the microservices and
protect sensitive data.
Circuit Breaker: Resilience4j is used to maintain system reliability by
preventing cascading failures in microservices through circuit-
breaking mechanisms.
Message Broker: Apache Kafka forms the backbone of Micro
Marketplace's event-driven architecture, facilitating asynchronous
notification for orders.
Observability Stack: Distributed tracing is implemented to monitor
and troubleshoot requests as they traverse different microservices,
using Micrometer for metrics and Zipkin for tracing. Moreover,
Prometheus is used for collecting metrics, and Grafana for providing
a rich dashboard for visualizing and analyzing application
performance data.
Kaynak
Sayfası
Node.js E-commerce
https://github.com/nicholas-gcc/nodejs-ecommerce-microservice
https://medium.com/@nicholasgcc/building-scalable-e-commerce-
backend-with-microservices-exploring-design-decisions-node-js-
b5228080403b

Google Microservice Demo


https://github.com/GoogleCloudPlatform/microservices-demo

Micro Marketplace
https://github.com/ibatulanandjp/ecommerce-microservices

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy