How to build a distributed web service

C

Charles Hall

I've successfully built a web service which interacts with my company's document management system through it's supplied API. All works fine, except I now want to make the service more "distributed". Our document management architecture means that we have several document libraries spread across different sites. For performance reasons, I want to host an instance of the web service at each site, so that it can handle any requests to manage documents in the library it's closest too. I want to build into the web service a mechanism for passing the incoming request to a "sister", if it knows that the request was for manipulating a document in a library it's not close to. This logic must be in the web service itself, not any of the consuming applications.

The web service has been built with ASP.NET and WSE 2.0, so in web.config I have expressed all the libraries and which instance of the web service should manage those requests. I've also put in a setting so that the web service knows it's own name, if you see what I mean. I've set up web references to all of the instances of the web service.

The bit I'm stuck on is writing the code which at run-time will dynamically instantiate a proxy for the web service which needs to process the request (assuming the local web service is not the right one to handle requests for that library). Is Reflection needed here? Are there any short-cuts/smart approaches to this, as I'm not dealing with an unknown web service and it's associated methods and data types - the web service which initially receives the request merely wants to pass it on to an exact copy of itself.

Any help would be much appreciated. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top