Microservices Problem #1 - Multiple Http Requests

preview_player
Показать описание
This is the theoretical solution for my previous Microservices videos:

More Courses:

#microservices
Рекомендации по теме
Комментарии
Автор

Thanks for this video, I was wondering this

Vt
Автор

Also, I think that a 4th logical solution would be to make a list of all posts ids and send one http request to the comments microservice asking for all comments for the given number of posts.

lucasj.pereira
Автор

Does implementing microservices requires any packages to be installed?

keshavdk
Автор

Replicating data in another service is not a good option since each and every replication record have their own lifecycle and both service should be handling that lifecycle. For Example, Function is not only creating the comment, but update and delete operations also needs to be handled by both services which is bad practice because you are not only replicating the data, but also entity and other respective CRUD functional codes. If requirement comes in to change the comment entity with some blah blah attributes, both services will be affected and needs to be redeployed which means you are ignoring microservice principles. If posts and comments are tightly coupled, keep it in single microservice instead of separating it. its that simple. If you are going to ignore the principles, be ready for consequences ;)

VishvaRodrigo