"Async" webservice in Delphi

Hi,

I’ve been tasked with writing an async webservice of sorts, and just to make things better this is my first RO SDK project, and I’m quite new to webservices and jazz.

The setup is like this: On our end we’ll have a webservice which accepts a “request” message (SOAP). I then need to generate a response and call a remote webservice and hand it the response. The response generation might take a wee bit of time (seconds), though ideally the overall latency should be low relative to a human waiting.

Unfortunately I cannot make fundamental changes to the webservice interface, it’s not controlled directly by us.

Since this is my very first RO SDK project I’d just like some thoughts/pointers on how to best approach this.

My initial thought was to simply store all requests in the DB (so we have a log as well), along with a “processed” flag, and signals an event object.

I then have a single separate thread in the server which waits on the event object. When the wait is successful it pulls all unprocessed requests from the DB. Then, for each request, it generates a reply and posts it to the remote webservice. Once completed it waits on the event object again.

Is this a decent approach or are there some tools in the RO SDK which can make this simpler?

In general, your solution should work:
clients send request to your server, your server puts them into queue, later it are sent to remote webservice consequentially and received responses are sent back to clients.

Thanks for the feedback, I’ll go with my KISS approach then :smile: