next up previous contents
Next: More Example Protocols Up: Reference Counting Sessions Previous: Internal vs. External

Session Caching Strategies

 

In the presence of correct management of reference counts, protocols may want to implement some sort of session caching. For example, many of the sessions created on the receiving end of a remote procedure call will have their reference counts go to zero after the reply has been sent, and without caching, all of those sessions will be destroyed. While caching may not be important for all protocols, it is vital to the performance of protocols that experience a high frequency of traffic from the same sources.

If a protocol does cache idle sessions, it is important to make the caching transparent to upper protocols (i.e., an upper protocol should not be able to distinguish a newly created lower session from a cached lower session that is being reused). One aspect of this requirement is that protocols that cache sessions must be sure to check for the presence of openEnables when reusing sessions which would otherwise be passively created, and to call xOpenDone when reusing such sessions from the cache.

Following are some examples of caching strategies and how a protocol might implement them. These are just examples; other strategies are certainly possible.



next up previous contents
Next: More Example Protocols Up: Reference Counting Sessions Previous: Internal vs. External



Larry Peterson
Wed Feb 21 13:58:06 MST 1996