I don't know the details of your design, but perhaps you can use ordinary 
(non-singleton) objects that simply maintain their state in a shared, machine-wide 
medium (eg: a file with a well-known pathname).

Of course you'd need to synchronize access to the file...  but depending on your usage 
statistics (frequent read, seldom write?) you might end up with better perf. than 
remoting.

Cheers,
-Shawn
http://www.arithex.com/



----- Original Message ----- 
From: "Matthew Hunter" <[EMAIL PROTECTED]>
Sent: Tuesday, July 02, 2002 17:17
Subject: Singleton without remoting


> Guys,
> 
> Just wondering if anyone has come accross a way of having a singleton
> object on the same machine as the clients, but without using remoting.
> 
> I now how to do this if the client objects are in the same process (app-
> domain?) as the singleton, but not if the clients are in different
> processes (as they do not see the singleton in the other other process,
> and create their own).
> 
> I don't mind using remoting so much to do this, but I would like to avoid
> the overhead of remoting - seeing that the client and server are on the
> same machine.
> 
> Is there much overhead in remoting calls from a client to a server if both
> are on the same machine?
> 
> Cheers
> 
> Matthew Hunter
> 

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to