How can I queue requests for an XML service?

J

Jerry H.

I want to set up a XML service that will act as a middle tier between
several different client apps and a rather expensive and outdated ODBC
client.

Currently, wehave several machines with an particular ODBC client
installed so that these machines can access a UNIX accounting systems's
core tables directly. But the problem is that we have only 3 access
license; in other words, while we're free to install the ODBC on as
many machines as we like, only 3 programs can actually be connected to
the UNIX db at any given moment; attempts to go about that result in
failed calls.

So, what we'd like to do is introduce an XML service that uses a single
ODBC client seat, and then all other apps would be upgradeed to use the
XML service.

My question is this: how do I set up some kind of FIFO within the XML
service, so that it can queue multiple requests from any number of
applications. Is this taken care of automatically by IIS, or will IIS
attempt to open any many connections to the ODBC as it can, rather than
one at a time?
 
J

Josh Twist

I think there might be a number of approaches you could take..

- write your own thread pool where you can queue items from each
request and limit the maximum number executing to the appropriate
amount (you maybe able to use Jon Skeet's threadpool available here:
http://www.yoda.arachsys.com/csharp/miscutil/).

- ADO.NET uses connection pools. Maybe you can adjust the size of the
connection pool to 1 (or 3 or whatever makes most sense)?
http://msdn.microsoft.com/library/d...onconnectionpoolingforodbcnetdataprovider.asp

This would be the easiest solution as you wouldn't have to do very
much, though you may run into problems with Timeouts

- Have a look at MSMQ (Microsoft's Message Queueing technology). I'm
not sure your requirement would be a standard use of MSMQ, but you
maybe able to tweak some settings leverage it to achieve what you need.

- A very full solution might use a combination of technologies like
this example: http://www.15seconds.com/issue/031202.htm

- get some more licences... :)

Good Luck

Josh
http://www.thejoyofcode.com/
 

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,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top