A
asadikhan
Hi,
I have a client server application where the client sends a request to
the server with a filename. The server needs to read the file
contents, massage the data, and then add it to the database. However,
if two requests show up at the same time, I need to create some sort
of a waiting mechanism or queue.
I was thinking about using a Singleton Server Activation object for
this reason, but I am not sure how I can implement the queueing
mechanism. As far as I know, once the server method is done adding the
file contents to the database, it will return true/false. But I need
it to pick up any pending files in the queue and process them as well.
At the same time, I don't want the first client request to wait until
all the files in the queue are processed.
The client also is waiting for a success/failure bool from the server
side method.
Any ideas on how I can accomplish this?
Asad
I have a client server application where the client sends a request to
the server with a filename. The server needs to read the file
contents, massage the data, and then add it to the database. However,
if two requests show up at the same time, I need to create some sort
of a waiting mechanism or queue.
I was thinking about using a Singleton Server Activation object for
this reason, but I am not sure how I can implement the queueing
mechanism. As far as I know, once the server method is done adding the
file contents to the database, it will return true/false. But I need
it to pick up any pending files in the queue and process them as well.
At the same time, I don't want the first client request to wait until
all the files in the queue are processed.
The client also is waiting for a success/failure bool from the server
side method.
Any ideas on how I can accomplish this?
Asad