These two methods that were totally unknown to myself just saved me a lot of headache. My scenario: a user draws a shape on a mapping page. That shape is stored in db1. That shape is then passed to a function to query data in db2.
At first I was just passing the geometry that was fetched from one server context to the function which was then using a different servercontext to execute another query. This always resulted in 0 returned results. If you have ever used LINQ to SQL its the same thing with passing an entity from one function to another. You need to pass the context it was created with as well.
IServerContext.SaveObject does some serializing to a string and then makes it simple to pass any object that supports IPersistStream. Very cool. I can save my Igeometry object to a string, pass it in the function, use the db2 servercontext to load the Igeometry back and use it in the query and everything is happy!