[Mono-dev] Keep-alive connection with Remoting?

Rafael Teixeira monoman at gmail.com
Wed Aug 9 16:01:57 EDT 2006


You have to choose the server state-model and configure the Lifetime
policy in the server. The default even for the singleton state-model
is to kill the server object after a few minutes and recreate on the
next request from the client.

It is a design-for-scalability decision MS did for remoting, as
long-living server objects (and also connections) are some of the
worst enemies of scalability.

As you said scalability is a concern for you, I need to warn that you
are actively working against it by choosing persistent connections,
and long-living server objects.

My experience is that persistent connections put a ceiling (and a
really low one) on how much you can scale, something like a few
hundred to a thousand simultaneous connections depending in the OS and
network I/O efficiency of the hardware.

Long-living server objects strain memory usage and thus garbage
collection (even causing server hiccups), when you try to scale up,
but surely, how fast it breaks is dependent on the memory consumption
of all the chain of objects needed by your server object to service a
request, so it is more tied to your specific implementation than the
persistent connections issue.

Just some facts I learned from a long life is this business, and that
I teach my post-graduation students in return.

Hope it helps,

On 8/9/06, Ympostor <ympostor at clix.pt> wrote:
> Ympostor wrote:
> >> It's probably better to contact the author for a true OSS license.
> >
> > Well, if I port it completely to the 2.0 stack (...)
>
> Finally I have totally ported it to 2.0 and fixed it a little bit so as
> to use more interfaces (and then not having the server implementation as
> a reference in the client).
>
> However, I am making some tests and I come out with strange behaviours
> with the demo: after 5 or some more minutes of idle connection, the
> server looses the proxy references to the clients and removes their
> remoting object automatically (without using any written code) and
> silently from the array, without giving exceptions neither in the server
> nor in the clients.
>
> I have already overriden the InitializeLifetimeService method of the
> MarshalByRefObject client class (returning null), but this doesn't fix it.
>
> Anybody has an idea of what can be going on? Or tell me a way to debug
> it? I can send the modified sources in case anyone asks me for them.
>
> Regards.
>
> --
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man." George Bernard Shaw



More information about the Mono-devel-list mailing list