[KULRICE-9151] Document in the guide on clustering that session failover should be implemented for full reliability Created: 13/Mar/13  Updated: 03/Apr/13  Resolved: 27/Mar/13

Status: Closed
Project: Kuali Rice Development
Component/s: Documentation
Affects Version/s: None
Fix Version/s: 2.1.4, 2.2.2
Security Level: Public (Public: Anyone can view)

Type: Task Priority: Critical
Reporter: Eric Westfall Assignee: Grant Trudel (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Rely
relies on KULRICE-9148 Disable SessionDocumentService in the... Closed
Similar issues:
KULRICE-9237Restructure sections on clustering and session document service
KULRICE-6031Document implementation/configuration guides
KULRICE-1269Document Session Enable Document feature
KULRICE-9272Instructions to setting up a Rice cluster are incorrect (installation guide)
KULRICE-2209KSB failover implementation is inadequate
KULRICE-6172Document the Implementation Considerations guide for KNS
KULRICE-6125Document the Implementation Considerations guide for KSB
KULRICE-12270Disable failover on topic messages in KSB
KULRICE-6215Add information regarding Implementation Considerations guide for Rice
KULRICE-1036Support Session Scope for Kuali Documents
KAI Review Status: Not Required
KTI Review Status: Not Required
Include in Release Notes?:
Yes

 Description   

As discussed in the KTI on March 13, 2013. We are planning to disable/remove SessionDocumentService. There are other solutions for session replication/failover. Including features built natively into Tomcat and other j2ee servlet/application containers. Also solutions like Terracota Web-sessions.



 Comments   
Comment by Jessica Coltrin (Inactive) [ 15/Mar/13 ]

Given the date changes for 2.1.4/2.2.2, I'm moving this back to 2.1.4/2.2.2.

Comment by Peter Giles (Inactive) [ 22/Mar/13 ]

Session Replication

To enable the seamless transition of web clients between clustered servers in the case that a node becomes unavailable, you will need to configure session replication. This needs to be set up either within your application server (if it supports this functionality), or using a third party tool such as Terracotta Web Sessions. This configuration is not specific to Rice, it will vary depending on the solution you choose, and it is beyond the scope of this documentation.

The Session Document Service

The SessionDocumentService, which was part of the default configuration for Rice before versions 2.1.4 for the 2.1 line and 2.2.2 for the 2.2 line, provided session failover in certain limited cases, but was disabled as part of KULRICE-9148. This service was problematic for performance when dealing with larger documents, and it is not recommended that it be re-enabled. It is possible to do so however.

To enable it again, a bean definition overriding the knsSessionDocumentService bean needs to be created and configured to load into the correct Spring context. Create a file such as the following which we'll name KNSOverrideSpringBeans.xml:

KNSOverrideSpringBeans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

        <bean id="knsSessionDocumentService" class="org.kuali.rice.kns.service.impl.SessionDocumentServiceImpl">
                <property name="maxCacheSize" value="${session.document.cache.size}" />
                <property name="businessObjectService">
                        <ref bean="businessObjectService" />
                </property>
                <property name="sessionDocumentDao">
                        <ref bean="sessionDocumentDao" />
                </property>
        </bean>
</beans>

This file needs to be added to your web project so that it can be accessed from the classpath. For this example, it has been added to src/main/resources/edu/sampleu within our web project. With that in place, the following (adjusting for the actual path) should be added to your rice-config.xml file:

rice-config.xml
<param name="rice.kr.additionalSpringFiles">classpath:edu/sampleu/KNSOverrideSpringBeans.xml</param>

Note that if you already have a rice.kr.additionalSpringFiles configuration parameter specified, the value is treated as a comma separated list, so you can add a comma at the end of the present value and append on the configuration for the KNSOverrideSpringBeans.xml file.

Comment by Peter Giles (Inactive) [ 22/Mar/13 ]

I need to do some confirmation that the configuration that I doc'd above actually works, but I'm throwing a draft in here to get things started.

Comment by Jerry Neal (Inactive) [ 23/Mar/13 ]

Eric,

What impact does this have for our KRAD strategy? We were planning on implementing this to back up the form when the session times out. Should we revisit that?

thanks,
Jerry

Comment by Eric Westfall [ 25/Mar/13 ]

Jerry, yes it sounds like we should revisit that and discuss if there are any implications of not providing such a feature.

Comment by Grant Trudel (Inactive) [ 27/Mar/13 ]

Added documentation into the installation guide as noted.

Generated at Mon Oct 21 05:40:13 CDT 2019 using JIRA 6.1.5#6160-sha1:a61a0fc278117a0da0ec9b89167b8f29b6afdab2.