Ryan McMahon created GEODE-6881:
-----------------------------------

             Summary: Revisit design for non-sticky sessions in client/server 
topology for Tomcat session module
                 Key: GEODE-6881
                 URL: https://issues.apache.org/jira/browse/GEODE-6881
             Project: Geode
          Issue Type: Improvement
          Components: http session
            Reporter: Ryan McMahon


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.

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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to