In the case of a 3 tiers application with:
- grpc client (agent)
- grpc server
- database (mongo)
The agent is sending events to the grpc server. It could be a single event but it could also be a couple of hundred ones in a single batch. There is no general pattern on how many events at which frequency.
What kind of caching could be set up to avoid having 1 call / 1 write into the database?
Because it is grpc, there is the possiblity of using streams. However, the stream needs to be kept opened with the server as events are occurring at random times.
There could also be client-side or/and server-side caching to allow bulk writes into the database.
What kind of software engineering pattern would you do in this scenario?
Aucun commentaire:
Enregistrer un commentaire