.NET Remoting?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to distribute the processing of a single process to multiple
computers using C#?

If I understand remoting correctly, this is what Remoting is for, right? Or,
is it for running multiple instances of a single process on different systems?

Thanks in advance
 
Ryan said:
Is it possible to distribute the processing of a single process to multiple
computers using C#?

If I understand remoting correctly, this is what Remoting is for, right? Or,
is it for running multiple instances of a single process on different systems?

Thanks in advance

I use the singleton model, and broadcast via events.

Also, Genuine Channels has been very helpful to maintain connections,
and provide security. It is worth a look-see, and support has been
superlative.
 
So does Genuine Channels actually help with "split processor" processing?

I'm still a little confused on how to share a thread's processing between
systems...
 
I'm not sure what "split processor" processing is.
I'm not sure what sharing a thread's processing between systems is.

Remoting does what you originally asked about though.

If you make a remote object server, then your clients will make
instances of remoted objects on that server. This can be from the same
process, another process on the same computer, a computer across the
room, or a computer across the world when using TCP as your remoting
channel, but there are other choices for remoting such as WEB, shared
memory, etc.

The singleton model means that one instance of the remoted class serves
all (we don't make new instances each time someone attempts this, but
rather, they all get a reference to the one single object), as one might
make with a Chat Server (see examples at the Genuinue Channels website).

When an event is raised at the remote server on the one instance of the
object, then all clients who have an instance of that object receive
events (just like events delivered by other classes or forms controls in
your project, instanced locally).

- Lee
 
Here's the situation that I'm trying to accomplish:

I have a thread that runs a VERY CPU intensive command line process and I
would like to split the processing of that process between multiple systems
in a LAN.

So, I really want the other systems to "help out" with a process that is
running on a system...

Is this possible to accomplish using remoting?
 
Ryan said:
Here's the situation that I'm trying to accomplish:

I have a thread that runs a VERY CPU intensive command line process and I
would like to split the processing of that process between multiple systems
in a LAN.

So, I really want the other systems to "help out" with a process that is
running on a system...

Is this possible to accomplish using remoting?

:

Well sure.

Consider this. You write a program and make a class to do some portion
of work, call it CWork.

Now you make 3 instances of CWork, and initialize each to do a portion
of the work via object method calls. And run each CWork.DoWork method,
each on a separate thread. All still in the same process.

Now for what you are talking about. Say you have CWork as an object that
is instancable via .NET remoting, and it is installed on 3 computers.
Now you make 3 remoted instances of CWork, and initialize each to do a
portion of the work via object method calls. And call each CWork.DoWork
method (perhaps each on a separate thread so you can JOIN again when all
the portions have completed - or perhaps not).

This would not be as I took your original description of distributing
events to multiple subscribing clients, but rather, one client asking
many servers to do part of the work.

The purpose of remoting is NOT for what you describe, but it will do it,
and nicely. Basically the purpose of remoting is to get objects running
outside of your process to do things for you, period. It is less
specific than your question asks, is what I am saying. It is MUCH more
efficient for you to write code to call methods on objects, and receive
events for them, and so on, than to write complex interprocess
intercomputer communications for this. Although instancing and wind down
of remoted objects is just a little different than locally implemented
and run objects, after this, very much, using them is not much
different, if at all.

Go out there, and get your feet wet!
 
Back
Top