Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-6881

Revisit design for non-sticky sessions in client/server topology for Tomcat session module

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • http session
    • None

    Description

      In order to use non-sticky sessions, a user must set enableLocalCache false and they should also set the (undocumented) flag gemfire.EXPIRE_SENDS_ENTRY_AS_CALLBACK to true.  The former flag sets the region type to PROXY on the client (no local caching) so that all operations must go to the server.  This avoids dealing with asynchronous behavior resulting from local caching (event replication to local caches is performed through asynchronous client queues).  It also causes the client to register interest in all keys so it gets notified of expiration/session invalidation events.

      The latter flag forces the server to add some additional "context" to the event which is forwarded to the client when an expiration/session invalidation occurs.  That context is used to retrieve the actual session object and call session.expire().  This logic can easily be found by tracing usages of the flag in the code.

      It would be better if we could avoid setting this flag on the server, and instead indicate that we need this additional "context" when we register interest with the server.  This may already be possible or it may require adding new API around interest registration to request the additional context.  That way the customer does not need to remember to set this server flag.  We might generally just want to be able to register interest in specific event types, such as EXPIRE_DESTROY in this case.

      If the above is not possible and we still need the second flag, we should at a minimum add it to the documentation so we ensure session.expire() is always called on the client.  If this flag is not set, then session.expire() will not be called which may result in listeners not getting fired or resources not getting cleaned up.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rmcmahon Ryan McMahon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: