Click to See Complete Forum and Search --> : ASP.NET threads question


dogcow
May 23rd, 2009, 01:11 PM
First let me preface by saying I am a LAMP developer for 12yrs. I am new to .NET, I work in a LAMP shop but we need to use .NET to get this project working.


Heres the situation, we have a windows program that can take a street address and return long/lat coordinates from it (geocode). It has an API in C. We wanted to take these methods and expose them as a webservice so our LAMP based applications can access them and we can access them in javascript. I've managed to import the unmanaged C functions into C# already and have a basic running ver of it.

The problem is this.. the software limits you to only 8 concurrent API instances at one time. However, each API instance allows you to perform 32 concurrent geocode within that instance at once.

So right now, I have it set up so each instance of the web service controls an API instance. It uses the threading.semaphore class so that if you call more than 8 instances at once, they have to wait until others finish ( or return a too busy error if timeout).

My question is there a way to set it up so that we can use the full power of 256 concurrent searches (8 instance * 32 search threads) ?

In case you are wondering, the software we're talking to through the API is designed for batch querying , we want to use it to just do 1 address at a time.

Any help would be GREATLY appreciated.