Cook Computing

Server Side Sponsor

February 26, 2004 Written by Charles Cook

Ingo Rammer has made available the slides and samples from his talks at DevWeek London. There's some interesting stuff here. One point that I noted in the Top 10 .NET Remoting Real World Issues presentation was his suggestion of using server side sponsors for keeping remoted objects alive in .NET remoting. He illustrates how the use of client side sponsors can fail when a firewall prevents calls from the server to the sponsor object on the client. The solution is to place the sponsor object on the server and get the client to periodically ping the sponsor, using a background thread, so that the sponsor knows that the client is still interested in the remoted objects. As Ingo says, this is pretty much what DCOM does.

One other scenario in which this could be useful is where you want to minimise the number of remoting calls per second as much as possible. Instead of server -> client sponsorship calls for individual objects, you get a single periodic client - server call. An alternative would be to increase the length of the leases but you might not want to do this in some situations.