Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-9151

Document in the guide on clustering that session failover should be implemented for full reliability

    Details

    • Type: Task
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.4, 2.2.2
    • Component/s: Documentation
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • 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.

        Attachments

          Issue Links

            Activity

            Hide
            jcoltrin Jessica Coltrin (Inactive) added a comment -

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

            Show
            jcoltrin Jessica Coltrin (Inactive) added a comment - Given the date changes for 2.1.4/2.2.2, I'm moving this back to 2.1.4/2.2.2.
            Hide
            gilesp Peter Giles (Inactive) added a comment - - edited

            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.

            Show
            gilesp Peter Giles (Inactive) added a comment - - edited 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.
            Hide
            gilesp Peter Giles (Inactive) added a comment -

            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.

            Show
            gilesp Peter Giles (Inactive) added a comment - 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.
            Hide
            jkneal Jerry Neal (Inactive) added a comment -

            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

            Show
            jkneal Jerry Neal (Inactive) added a comment - 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
            Hide
            ewestfal Eric Westfall added a comment -

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

            Show
            ewestfal Eric Westfall added a comment - Jerry, yes it sounds like we should revisit that and discuss if there are any implications of not providing such a feature.
            Hide
            gptrude Grant Trudel (Inactive) added a comment -

            Added documentation into the installation guide as noted.

            Show
            gptrude Grant Trudel (Inactive) added a comment - Added documentation into the installation guide as noted.

              People

              • Assignee:
                gptrude Grant Trudel (Inactive)
                Reporter:
                ewestfal Eric Westfall
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: