microservices icon indicating copy to clipboard operation
microservices copied to clipboard

Do these services talk to each other ?

Open peterfebin opened this issue 8 years ago • 2 comments

peterfebin avatar Jul 28 '17 04:07 peterfebin

The user service talks to the booking and movie services. https://github.com/umermansoor/microservices/blob/master/services/user.py

umermansoor avatar Jul 29 '17 18:07 umermansoor

Line 52 of user service users_bookings = requests.get("http://127.0.0.1:5003/bookings/{}".format(username))

user service here makes a GET request (same as external user making one) to booking service. This is a crucial learning as part of Microservices design. Services talking to each other is just a fancy way of saying one service making a REST request (in this case) or RPC request to another. It is this channel of communication which makes this design modular and independent. It was an ah-ha moment for me too when I realized this looking at this line. So I understand where you might be coming from. :)

amitkc00 avatar Dec 15 '17 04:12 amitkc00