yAOwzers / ecommerce-app

use of micro-services
0 stars 0 forks source link

Discussions with Friends #1

Open yAOwzers opened 1 year ago

yAOwzers commented 1 year ago

Longbin

Breaking down the different parts of the requirements, the thought process should be as follows:

Requirement 1: Micro-service Architecture

  1. Think about how to implement the Micro-service architecture
  2. Think about what Functionalities are needed, then group those functionalities into independent services
  3. If implemented properly, it would mean that you can scale your application as needed to handle the request. (Spinning up instances of micro services to scale horizontally)

Requirement 2: Volume

  1. Most basic would be a load balance to route traffic to copies of your micro service with capacity
  2. Next step would be to make your micro services asynchronous, by using queues or event-driven pattern

Last

  1. Think about Deployment, how will you deploy

Issues to look out for

  1. Not making each service independent enough
  2. Harder part would be to set them up asynchronously and deployment

Resources

https://medium.com/@saurabh.engg.it/developing-high-performance-applications-microservices-860cb4509d27

Quite an intense article. But most fundmental would be point 4 Microservice communication: Asynchronous (Non-Blocking) requests wherever possible

yAOwzers commented 1 year ago

Yee Chern

Services to split by

backend + frontend: a simple authentication flow, using jwttokens if possible, data aggregation if possible, API calls to submit orders (if designed asynchronously it will be a plus) Data: storing of products data AWS S3: store images data caching : storing of shopping cart items, authentication data frontend: display of products, shopping cart

Frameworks:

Frontend: Material UI, React, HTML, CSS, Javascript Backend: Go Database: NoSQL, MongoDB Cache: Redis

Optimizations

RPCs between different micro-service

yAOwzers commented 1 year ago

ChatGPT

Services

Here are some common microservices that are typically implemented in e-commerce applications:

Microservice Description
Catalog This microservice is responsible for managing the product catalog and providing product information to other microservices and the frontend.
Inventory This microservice is responsible for managing the inventory of products and providing information about product availability and stock levels to other microservices and the frontend.
Order This microservice is responsible for managing the order lifecycle, including order placement, payment processing, and fulfillment.
User This microservice is responsible for managing user accounts and authentication and authorization.
Shipping This microservice is responsible for managing the shipping and delivery of orders.
Recommendation This microservice is responsible for providing product recommendations to users based on their browsing and purchasing history.
Search This microservice is responsible for providing search functionality to the frontend, allowing users to search for products by name, category, or other criteria
Review This microservice is responsible for managing product reviews and ratings, allowing users to leave feedback and ratings on products.

Each of these microservices should be designed to be independent, autonomous, and scalable, with clear boundaries and interfaces. They should communicate with each other using lightweight protocols such as REST or message queues, and should be deployed and managed separately. By breaking down the backend into smaller, focused microservices, the application can be more scalable, resilient, and maintainable.

Optimizations

Frontend Optimization:

Backend Optimization:

Database Optimization:

yAOwzers commented 1 year ago

Minimum Viable Product (MVP)

yAOwzers commented 1 year ago

Resources

Microservices-Based Architecture in Ecommerce. https://www.scnsoft.com/ecommerce/microservices

image

Event Driven Architecture

https://solace.com/what-is-event-driven-architecture/

Key topics to understand Event broker Event portal Topics Event mesh Deferred execution Eventual consistency Choreography Command Query Responsibility Segregation

yAOwzers commented 1 year ago

Example projects:

https://github.com/idugalic/micro-ecommerce

image

https://github.com/mehdihadeli/ecommerce-microservices

image

https://github.com/RainbowForest/e-commerce-microservices

image

Medium Article

https://dearsikandarkhan.medium.com/microservices-architecture-for-e-commerce-f8b49270e72f

image

https://hygraph.com/blog/ecommerce-microservices-architecture

image

Youtube Video

https://www.youtube.com/watch?v=rckfN7xFig0&t=119s