Comparing messages and events
In the previous chapter, we used connected network communication with all the services. First, we look into the communication between the bot and the game APIs as shown in Figure 15.1:
Figure 15.1 - Synchronous communication between the bot and the game APIs
The bot service can be accessed via REST. The bot service itself invokes the game APIs service via gRPC (all other clients use REST with the game APIs service). The bot service then continues communication with the game APIs service, sends moves until the game is complete, and continues with the next game until a specified number of games is played. The bot client invokes the bot service via REST which is (like gRPC) synchronous communication, with request/reply. The bot service here doesn’t have a synchronous implementation, as the bot client doesn’t need to wait until all the games are played – the HTTP protocol would timeout during this time. Instead...