Running dispatcher in a separate process from Disconnected service agent

Topics: Mobile Client Software Factory
Apr 25, 2007 at 10:06 AM
I need to separate and run the WebServiceRequestDispatcher in a separate process from the Disconnected service agent (DSA) . Basically, I need to separate the send and receive parts of DSA.

Has anyone tried this? looking at the code, it seems that the RequestManager and the dispatcher need to be running in the same process.

any help would be appreciated.

May 2, 2007 at 5:24 PM
You should be able to have another process reading from the database the queued requests and dispatching. Note, however, that this process will need to be able to load the right assemblies - it would have to be able to load the web service proxies, and the types required for processing successfull/unsuccessfull dispatches; as well as have access to the endpoint catalog and related config.
One thing you will need to make sure is that if you do initialize a dispatcher on the main UI app it is stopped, and you need to be OK with the fact that since your separate process cannot receive an event every time a message gets queued (unless you enjoy writing remoting work ) so you'll need to have a polling / timing mechanisms in your dispatcher process (otherwise, if the computer is connected and you keep queuing requests the dispatcher in the other process will never find out).
Have you tried this? Did you run into any roadblocks?
May 24, 2007 at 2:56 PM
Edited May 24, 2007 at 2:57 PM
Thanks for your suggestions edjez.

I have now decided to use two DSA blocks: one in proc and the other out of proc.

The in proc handles in session messages which require a response and which is shut down with the application.

The out of proc DSA will handle messages which so not require a response and which are delivered even if the application is shut down. (message processig failures to be handled on the server).

This seems to be a very clean separation of message types as well. The only downside I can see is the use of two DSA's might use more memory and processing power on the device.