I am creating a .NET web service that will be consumed by a provider application, and I'm not sure how to do the following:
- The provider will call my webserivce with some information, but wants the confirmation to be returned quickly, simply stating that I received their information. They donโt care what I do with him and donโt want confirmation that Iโve finished processing.
- The information that I transmitted must do something behind the scenes and act with the information in a time-based manner, that is, take some action within a few minutes. I will contact a number of other web services, as well as work with some databases. Obviously, this will happen after I answer โSuccessโ to the calling application.
I have no control over how the provider accesses my service, and the method they use to call it is synchronous, so I need to respond quickly so that the calling application continues its work. As I can see, there are two options, although I am open to others:
- Since the calling application is essentially sent to the queue, so that the process I wrote can process it, I can make the web service simply send the item to the database (or MSMQ or another queue) and then return success, the queue process will process from there.
- Ideally, I imagined that my service could return "Success", and then just continue processing on my own, but I'm not sure if this is possible. Since my processing is time sensitive, debugging the background processing of a new request is ideal, so the latency is minimal.
Are there any other ideas or is one of these sounds preferable?
source share