Groups | Blog | Home
all groups > dotnet remoting > april 2006 >

dotnet remoting : Remoting and Threading


Mehdi
4/3/2006 12:00:00 AM
[quoted text, click to view]

AFAIK, in .NET Remoting, each remote invocation (regardless of whether the
object accessed is a SingleCall or a singleton object) in done in its own
thread (taken from the ThreadPool i think). In case of a singleton object,
this means that you have to take care of protecting shared variable and
synchronizing your code if necessary. So even if you have only one method
exposed via .NET Remoting, each remote call to this method will occur in
Itay Sandbank
4/3/2006 1:00:02 AM
Hi there.

Can someone please point me in the direction of a good document explaining
how remoting works with threads? Which threads are used, can I limit these
threads some way (I'd like, for instance, all calls made on a specific
SingleCall objects to occur in a specific thread), etc... ?

I'm also looking for some documented behavior regarding asynchronous
calls, sinks and threads. Can I trust a single remoted method call to occur
all in one thread in the server, or can it take place in two or more threads
when asynchronous calls are made?

Thanks,
Itay Sandbank
4/3/2006 2:37:01 AM
[quoted text, click to view]

Yes, thanks, this far I already realized the first time I tried to write a
remoting server, and threads started flying all over the place... But what
happens in asynchronous calls when I write my own sink? Also, is there some
sort of sink provider (or something else) that provides single-threaded
calls? If not, I guess I can try to write one...

Mehdi
4/3/2006 12:00:28 PM
[quoted text, click to view]

I unfortunately don't have much knowledge of the inner workings of .NET
Remoting and there seems to be very little documentation on that.

You could use Reflector to examine the source code of the built-in .NET
Remoting channels, this might give you some clues as to how all that works.

Also, Ingo Rammer's Advanced .NET Remoting book has several chapters
dedicated to the inner working of .NET Remoting and custom sinks so you
might find some info there as well.

I realize that none of this really addresses your particular question about
AddThis Social Bookmark Button