Hi!
> so i can not use server activated object .I don't want to use
> singleton.
>
> so only solution i see is client activated - single call object.
Why don't you use the SingleCall Server-Activated Objects?
> 1)Are there any known architectural issues in using client activated
> object from a web client application..like asp.net
None I am aware of.
> 2)I can set the life time of the object to some reasonable time
> depending on how much time the web request will take on the server.
If you use Client-Activated Objects the Lifetime-Management is more
complicated compared to Server-Activated Objects. The default Lifetime -
Implementation returns a ILease Object with configured Timespans when an
Object will be released.
If you want the Lifetime of an Object to be controlled by the Client itself,
you have to implementent a Sponsor (ISponsor) that runs on the clientside.
http://msdn.microsoft.com/msdnmag/issues/03/12/LeaseManager/default.aspx
http://www.thinktecture.com/Resources/RemotingFAQ/Lifetime.html
http://www.google.com/search?q=%2enet+remoting+lifetime
> when server asks clinet to renew lease ..how does it identify the
> client..
The ObjRef is serialized to the server.
> in a web application all request to the remote server are comming from
> the same clinet (web server)...would remoting infrastructure
> automatically make the request to right thread on the server..
What do you meen with "the right thread"? Remoting uses the ThreadPool.
GP
siddharthkhare@hotmail.com - 19 Oct 2006 20:39 GMT
It is asp.net ode behind page which is making the request to remote
object.
ASP.net will have mutple threads running to serve mutiple request from
differents clinets(Browser).
Request to the remote server for objects could be made concurrently
from different asp.net threads.
when remote server asks clients to renew the lease whould it go to
right thread.
I think it would but just wanted to confirm.
it is NOT a thick client application where clinet would be different
physical machine.
In my case it same asp.net process/same machine (multiple thread ) that
is making call.
So in short will remoting infrastructure identify the thread that made
the call and ask that specfic tharad only to renew the lease.
Just wanted to confirm it.
2)Also won't i end up having objects longer in memory than they would
be if i was to lets say just use them locally.
because this check of lease renewal will only happen at certain
interval object will be in memory of remote server slightly longer that
required.
Would this cause any perormance issues on a high stress environment?
only counter argument i can think for this is that even when we
deallocate a object garbage collector does not collect it immediately
so if remoting adds few more second/millisecond to it it may be okay..
but again need to see what others think about it.
Thanks
Sidd