.NET remote object running locally
-
I have been playing around with .NET remoting for a while (roughly two weeks), and today is the first time I noticed that the code in my remoted object is always being run on the client. I have made a benchmark test for this. When I run the test on my main machine (P4XP), I get in the 100's for the result. I start up a server session on a remote machine (ATHLON), and then I run, from P4XP, the same test, but supposedly on ATHLON. The big surprise is that I still get nearly the same benchmark result and I can see my CPU working 100%, on the local machine. When I run the other way around (from ATHLON to P4XP), I get the result for ATHLON, so I always get the result for the local machine. So my question is, is this normal behavior for .NET remoting? Can I do anything to offset the work to the remote machine? Your help is greatly appreciated. --Dacris
-
I have been playing around with .NET remoting for a while (roughly two weeks), and today is the first time I noticed that the code in my remoted object is always being run on the client. I have made a benchmark test for this. When I run the test on my main machine (P4XP), I get in the 100's for the result. I start up a server session on a remote machine (ATHLON), and then I run, from P4XP, the same test, but supposedly on ATHLON. The big surprise is that I still get nearly the same benchmark result and I can see my CPU working 100%, on the local machine. When I run the other way around (from ATHLON to P4XP), I get the result for ATHLON, so I always get the result for the local machine. So my question is, is this normal behavior for .NET remoting? Can I do anything to offset the work to the remote machine? Your help is greatly appreciated. --Dacris
Well, I've solved this problem. The remoting object was passed by-reference, but the remoting object was a collection of benchmark tests. The tests themselves were marked serializable, so they were run locally. Changing the tests to derive from MarshalByRefObject solved the problem. --Dacris