0
Answer

Web Service with long-running tasks

Adrian Lancer

Adrian Lancer

16y
1.8k
1
Hi folks,

New member here.

I have a basic web service design question.

In a web service, how do we implement the ability for a client to get updated status on a long running task (hours to days)? For example:

-A WS exposes a web method InitiateTransaction() that clients can call to intiate a transaction.

The business logic behind the WS may take several hours to couple of days to determine if this Transaction succeeded or failed.

Should we expose a method like GetTransactionStatus() that clients for this WS have to periodically call over a period of may be days, until the transaction fails/succeeds?

This seems horribly klunky.

What is the right approach to architect this?

Thanks in advance!

-Adrian