DEV Community

Discussion on: Technology stack for one-page one-function web app?

Collapse
 
matteojoliveau profile image
Matteo Joliveau

Yeah, it's definitely overkill for his scope. Nonetheless, it's a viable solution that can easily grow if the project grows.

About your question, yes using message queues it's actually a fairly old solution when dealing with multiple intercommunicating services. Think about old approaches like Enterprise Service Buses or Java JMS specification.

In a microservice environment, it's actually a really solid solution because it adds a layer of abstraction (the message broker itself) between loosely coupled services and allows for fully asynchronous communications.

Remember, a cloud environment should be error-resilient and services must fail gracefully and not take down the whole application if one of them dies. With message queues if a microservice dies unexpectedly the broker can still receive incoming messages, store them for later (so that the dead service can recover them when it comes back online) and optionally send back a Last Will and Testament message to the other service saying that the receiver has died. Also, Push/Pull, Publish/Subscribe and Topic queue mechanisms give more flexibility and efficiency when designing inter-service communications, and the ability to send binary payloads allow for easy use of formats like Google ProtoBuff or MessagePack instead of JSON, which are much more efficient in terms of bandwidth usage.

Thread Thread
 
n1try profile image
Ferdinand Mütsch

Very interesting thoughts, thank you ;-)

Thread Thread
 
matteojoliveau profile image
Matteo Joliveau

You gave me the idea to write a dedicated post about my experience with queues and RabbitMQ. Could be interesting, thanks to you :D

Thread Thread
 
n1try profile image
Ferdinand Mütsch

Please do it and let me know when it's finished!

Thread Thread
 
eldroskandar profile image
Bastien Helders

Would love to hear about it too.

Thread Thread
 
matteojoliveau profile image
Matteo Joliveau

After a lot of time, I finally published it :D Please share your thoughts, I'd love to know what do you think.
dev.to/matteojoliveau/microservice...