Using VB Express 2008, if the code makes a Remote Procedure call to a SOAP function on another machine is the CPU blocked until the call returns?
+1
A:
If you are asking about
- calls to a web service from a client
- The client proxy classes are created using "Add Service Reference", or
- The client proxy classes are created using "Add Web Reference"
then the answer is that they do, by default, block the thread that makes the call. They don't block the "CPU". Only the thread that makes the call.
You can also call the same methods asynchronously, if you need to.
John Saunders
2010-09-16 03:36:15
ok, that sounds good. So, if I have lots of threads, then I can make lots of RPCs in parallel? Thnaks
2010-09-16 07:11:12
If you make lots of calls (stop calling them RPCs) in parallel, then you will use multiple threads. It may or may not be one-to-one.
John Saunders
2010-09-16 07:18:45
sorry John (I don't see why they are not RPCs, but, then I am the n00b asking the question ;-), either I don't understand you, or we are talking past each other (and I *do* appreciate that you are trying to help me). If the server can handle multiple calls and the client has a single CPU and two threads which both call "at the same time", does the server see parallel calls or serial? As you rightly pointed out, this is a rephrase of my previous question. The point is that I am trying to simulate 100s of PCs using one test PC and need to know if I can do this by threading the calls.
2010-09-16 08:23:59
I hope that that is clear, but please ask for clarification if not, I need - and appreciate - your help here. Thanks.
2010-09-16 08:24:19
Threads don't work like you think. I don't have time to go into it, but you're way off. Among other things, the server can see multiple simultaneous calls, the client will have many more than two threads, and WCF is based on SOA or message-passing, not on RPC.
John Saunders
2010-09-16 08:45:48