Best Practice To Achieve Parallel Processing in Laravel/Lumen - Multi-cURL or RabbitMQ? #5
rishabhtrehan
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The core concept of creating microservices in Laravel/Lumen is to achieve parallel processing of APIs so that the application does not slow down when comes to multiple hits on the APIs in terms of large audience. Thus as per my findings I was able to get to the idea that this can be achieved either by using the concept of multiple cURL or by using any queueing mechanism like RabbitMQ. The core idea is to lower down the response time to bring a seamless experience to the end user.
Both have their own application advantages, like multi-cURL can be best used when let's say we are running a number of prerequisites or validations which are dependent on third party APIs.
In the same way if we are performing any database operation where there is no user interaction post the operation, like saving the form or updating the fields then in that condition we can use the queueing mechanism like RabbitMQ where it will store the request body to itself and will perform the database operation at its end, thus giving a minimum response time, which in turn provide the end user a good experience. This mechanism is also useful when lets say the database is down or there is any technical issue at the database end, the user operation won't get stuck and the application will also not get crashed due to this.
Please share your views on the same.
Beta Was this translation helpful? Give feedback.
All reactions