NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Leased based Lifetime

For objects that have object references that are transported outside the application, a lease is created. The lease has a lease time. When the lease reaches zero the lease expires and the object is disconnected from the NGWS runtime Remoting infrastructure. Once all the references to the object within the AppDomain have been freed, the object will be collected when the next GC occurs. The lease controls the lifetime of the object.

When a message is dispatched into the application for the object, the lease will be extended if the default renew on call time for the application is not zero. User code that has the proxy can extend the lease by obtaining the lease and renewing the lease. A lease can also have a list of sponsors. When the lease expires NGWS runtime remoting infrastructure asks the sponsors for a renew time. If the Application that provided the sponsor has been shutdown or communication between the two Application is broken for a time greater or equal to the SponsorShipTimeout, then the next sponsor is tried until all the sponsors in the list are exhausted. If this occurs then the lease expires.

Lease based Lifetime with Sponsors