mercredi 26 février 2020

standard grpc caching pattern for 3 tiers architecture

In the case of a 3 tiers application with:

  1. grpc client (agent)
  2. grpc server
  3. 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