Synchronous calls
As we've seen in the previous chapters, synchronous interactions between microservices can be done via RESTful HTTP APIs using JSON payloads.
That's by far the most used pattern, because both HTTP and JSON are the golden standards. If your web service implements an HTTP API that accepts JSON, any developer using any programming language will happily use it.
Following a RESTful scheme, on the other hand, is not a requirement and is prone to interpretation. Countless blog posts are debating the virtue of using POST versus PUT response on the internet.
Some projects implement Remote Procedure Call (RPC) APIs over HTTP rather than REST APIs. In RPC, the focus is on the action, which is part of the endpoint URL. In REST, the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access