educative.io

Curious about pub-sub vs connection oriented

Hey folks,

I am curious as to why we didn’t use an active message queue in this case. It feels like it would lead to an easier to manage architecture and less complexity.

Assuming the numbers in the article, we have 20 bil message per day or around 200k messages per second. With proper sharding, this number seems achieveable on modern MQs.

It also comes with offline messaging and other nice properties (notifications or whatnot). We can use deadlines or GCs to delete old message queues.

Thoughts?

Hi @Omid

My name is Shahrukh Naeem. I hope everything is going well with you. I will try my best to answer your query. Thank you for reaching out about this.

Yes, we can also use Active Message Queue here, no double it has a lot of features and ease as well. But, there are several approaches and architectures that exist so we used one of them just to design or implement this system. You can use other architectures when designing your own system so, there is no limit or restriction to always using only one approach.

It is great seeing our readers thinking out of the box and coming up with better suggestions. Your feedback is much appreciated!

I hope that this guide is helpful. Remember that I am always available via message to help you with any difficulty you might encounter.

Regards,

Happy Learning :slight_smile:

Thanks Shahrukh.

That makes sense! Just wanted to make sure that I am not missing a corner case that led to this architecture. It would be super cool to have a section on alternative architectures (without going into details) at the end of each chapter.

1 Like