Cook Computing

Pinging and Leasing

May 2, 2003 Written by Charles Cook

I was doing some research on leasing today when I came across a misleading rationale for leasing in Ingo Rammer's excellent book Advanced .NET Remoting. He explains that the pinging mechanism used by COM involves the server pinging the client and so:

Unfortunately, when your client is behind an HTTP proxy and is accessing your objects using SOAP remoting, the server will not be able to contact the client in any way.

This leads to a new kind of lifetime service: the lease-based object lifetime.

This is wrong. In COM the client pings the server and so this could be implemented over HTTP through a proxy. Leasing, although much more flexible than COM pinging, is not inherently different to pinging. Its just that in the COM case the "lease" is initially 6 minutes and the client COM runtime has to renew the "lease" manually (by pinging the server) without any sponsorship mechanism to warn that the "lease" is about to expire.