简体   繁体   中英

How to track requests and completion status in async systems?

I am trying to explore solutions to track requests in Async systems. This is my use case:

  • Currently in our system we have 2 services communicating asynchronously with Service 1 sending an operation to be performed against n items to Service 2 .
  • Service 2 on completion of those operations sends response back to Service 1 .

Currently how tracking is handled is via a request tracker table in Service 1 's DB from which we keep removing entries as and when we get response from Service 2 .

I was thinking if there is a more generic open source solution which I can leverage to track pending operations and perform some action once all pending are completed.

Anyone had a similar use case before?

Look at temporal.io open source project which solves the problem of long-running requests as well as many service orchestration use cases. In your example, the request to service1 can be modeled as a single blocking function call independent of the duration of the request processing (can be months).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM