all groups > dotnet remoting > august 2004 >
You're in the

dotnet remoting

group:

is there a way to pre-load remote objects in the host application?



is there a way to pre-load remote objects in the host application? MR
8/27/2004 4:44:06 PM
dotnet remoting: i have an application that uses enterprise services remote objects. the
calls are very fast usually within 50ms. EXCEPT for the first time the
object is called or after a long period of inactivity.
is there a way to preload all the objects in the host application so that
even the first call will be fast (as opposed to over 1 second)?
thanks
m

Re: is there a way to pre-load remote objects in the host application? Raghavendra T V
8/27/2004 8:31:40 PM
Hi,

1)You can use pre-jiting which will actually precompile and keep the object
( not sure about this )
2)You can use singleton pattern to achieve this (singleton makes sure that
always an instace of that object is in memory )

Hope this helps you.

Thanks
Raghavendra

[quoted text, click to view]

Re: is there a way to pre-load remote objects in the host application? MR
8/28/2004 8:28:37 PM
1) prejting doesn't cause objects to reside in memory.
2) it is a singleton, singleton doesn;t guaranty that it resides in memory.
it will only ensure that the constructor gets called only once the object is
instantiated

[quoted text, click to view]

Re: is there a way to pre-load remote objects in the host application? msherman NO[at]SPAM go-eol.com
8/31/2004 5:58:49 AM
[quoted text, click to view]

In chapter 3 of "Advanced .NET Remoting, C# Edition", I believe the
author describes the solution for this (at least for a single object).
It's on page 36 in a section titled "Published Objects". In your
server startup code you construct the object and then pass it to
RemotingServices.Marshal().

Sorry if my answer is way off base. I'm very new to .NET remoting but
I'm in the process of reading the aforementioned book and your
question rang a bell.

AddThis Social Bookmark Button