Microservices Architecture in Laravel

tufayalhossin
tufayalhossin
Tufayal Hossin Emon

  • The Riskiest Thing Is To Take No Risks.
  • Writen article 12
Microservices Architecture in Laravel

Here's what we've been up to recently.


Microservices Architecture in Laravel

In this article, I’ll create micro-services architecture for small online stores.

So we are going to build an online store app, In the application, users can list products for sale. It’s been products listed any user who signs up to our application can purchase products, checkout and make payment.

The architecture of micro-services is in the following diagram. Let’s have a look and try to explain as well.


In the above diagram overall design of the application and application have events like user-created, user updated, product created, product updated, product add, order, payment etc.

our client interact with microservices and each is connect with message broker called RabbitMQ

If product add into cart, product service invoked and update product status in MongoDB and RabbitMQ ssend a message to order service and create an order with payment status pending.

Now when user made payment, payment service invoked and message broker (RabbitMQ) send a message to order service and update order payment status to complete in DB.

RabbitMQ is a messaging broker — an intermediary for messaging. It gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.


Further Resources For You

Here's what we've been up to recently.

View all