views:

198

answers:

0

Scenario:

  • I have 50 (or more) processes running (myproc.exe) that do some business logic.
  • I want to have a web server that takes simple GET's (/foo.html) and just pass this information (the location of GET) one of the running myproc.exe
  • myproc.exe's and this exe (the webserver) have named pipes between them (so 50 named pipes) that pass the information back and forth (really only once forth, the filename and once back, 0 or 1 for if the file exists or not, this takes around 3-5 seconds to determine)
  • I have a Queue/Stack of Process pools (the 50 myproc.exe) to pick from, a request gets sent to this, it's becomes unavailable, or I was thinknig better yet, it is a priority queue and it becomes lesser in priority, but that's probably overkill

The probolem is I'm trying to think what is the most efficient way to get these requests from my own webserver I'm building, so I guess I'm asking for advice on how is the best way to use HttpListener class to server multi-threaded requests.

Also if some people want to chime in on the design and let me know if something can better.

FYI, I need processes for just some complicated reason!