Re: [Architecture] [Progress] HTTP Session Persistence for WSO2 Application Server

2014-11-19 Thread Gayashan Amarasinghe
Hi Pubudu,

Also please test with GD enabled. We ran into issues in session replication
when GD was enabled in the following scenario.

Enable GD in node 1 and 2 - Start node1 - update session attributes by
sending requests to node 1 - start node 2 (make sure during this startup
the ghost webapp is getting deployed instead actual webapp) - shutdown
node 1 once node 2 has started - check whether the session is replicated
to node 2

Thanks.
/Gayashan

On Wed, Nov 19, 2014 at 5:20 PM, KasunG Gajasinghe kas...@wso2.com wrote:

 Hi Pubudu,

 Did you also verify how does the Tomcat session persistence work with the
 Hazelcast based session replication?

 And, what are locations handled by the HouseKeepingTask? As I've seen it
 deletes the CARBON_HOME/tmp/work folder. Any reason why it deletes
 CARBON_HOME/lib/tomcat/work/Catalina/localhost?


 On Wed, Nov 19, 2014 at 5:13 PM, Pubudu Dissanayake pubu...@wso2.com
 wrote:

 Hi folks

 As of now I've completed base implementation support for HTTP Session
 persistence for Appserver. Therefore we can define Persistent Manager
 element [1] http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html
 as follows in global context.xml.

 *FileStore support *

 Manager className='
 org.wso2.carbon.webapp.mgt.CarbonTomcatSessionPersistentManager'
 saveOnRestart='false'
 maxActiveSessions='5'
 minIdleSwap='0'
 maxIdleSwap='1'
 maxIdleBackup='0'
   Store className='org.apache.catalina.session.FileStore'
  directory='location'/
 /Manager

 *Completed tasks *

- Preliminary testing for CarbonTomcatSessionPersistentManager can be
found here [2]

 https://docs.google.com/a/wso2.com/spreadsheets/d/1XVlYOp6grJKX4qPbk96QlyUN6VlCrPf1xo2fnE4gzvY/edit#gid=0,
but tests were conducted for FileStore
(org.apache.catalina.session.FileStore) support only
- CarbonTomcatSessionPersistentManager element support for
context.xml, As of now we only support CarbonTomcatSessionManager.

 *TODOs*

- Tenant-aware PersistentManager support for
CarbonTomcatSessionPersistentManager
- JDBC implementation (org.apache.catalina.session.JDBCStore) support
- Perform thorough test scenarios on session persistence vs session
replication.

 [1] http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html
 [2]
 https://docs.google.com/a/wso2.com/spreadsheets/d/1XVlYOp6grJKX4qPbk96QlyUN6VlCrPf1xo2fnE4gzvY/edit#gid=0

 http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html

 On Mon, Nov 17, 2014 at 12:01 PM, Pubudu Dissanayake pubu...@wso2.com
 wrote:


 On Mon, Nov 17, 2014 at 11:52 AM, Afkham Azeez az...@wso2.com wrote:

 Ok, go ahead with your implementation.


 ​Noted​



 On Mon, Nov 17, 2014 at 11:49 AM, Afkham Azeez az...@wso2.com wrote:

 So globally switching the SessionManager can be done by editing the
 global context.xml file?


 Indeed, we can configure it by editing global context.xml​





 --
 *Pubudu Dissanayake*
  Software Engineer

 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware
 Mob: + 94 775 503 304

 Blog: http://geekdetected.wordpress.com/
 Linkedin: *http://lk.linkedin.com/in/pubududissanayake*
 http://lk.linkedin.com/in/pubududissanayake
 Flickr : https://www.flickr.com/photos/pubudufx/
 Twitter: https://twitter.com/GeekInAction




 --

 *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc.
 email: kasung AT spamfree wso2.com
 linked-in: http://lk.linkedin.com/in/gajasinghe
 blog: http://kasunbg.org



 ___
 Architecture mailing list
 Architecture@wso2.org
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




-- 
*Gayashan Amarasinghe*
Software Engineer | Platform TG
WSO2, Inc. | http://wso2.com
lean. enterprise. middleware

Mobile : +94718314517
Blog : gayashan-a.blogspot.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


[Architecture] [Progress] HTTP Session Persistence for WSO2 Application Server

2014-11-16 Thread Pubudu Dissanayake
Hi Azeez/Sameera and et al.

I'm currently undergoing development of $subject [1]
https://redmine.wso2.com/issues/3417

In the current implementation of embedded tomcat in appserver doesn't
supports Manager[2]
http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html attributes
defines in context.xml which is a big disadvantage for $Subject
implementation. Furthermore we explicitly change Manager element via code
level so no flexibility toward clients to change Manager attributes via
context.xml.

Tomcat provides two Manager element implementations StandardManager and
PersistentManager. PersistentManager has the capability to swap active (but
idle) sessions out to a persistent storage mechanism[2]
http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html, as well as
to save all sessions across a normal restart of Tomcat. Our Appserver has
tenant-aware StandardManager implementation called
CarbonTomcatSessionManager but no PersistenceManager support yet.

I'm proposing we should go ahead and implement tenant-aware
PersistentManager support ( CarbonTomcatSessionPersistentManager ) thus it
will help us to achieve tenant-aware session persistence in future
releases. We should provide support for persistent Stores via context.xml
as well, in result end-users can configure different store elements in
context.xml. On going preliminary test scenarios [4]
https://docs.google.com/a/wso2.com/spreadsheets/d/1XVlYOp6grJKX4qPbk96QlyUN6VlCrPf1xo2fnE4gzvY/edit#gid=0
[3]
https://docs.google.com/a/wso2.com/presentation/d/15YyXzpj877LHmZtPQGIidgh-wnBVStiBTBN5oci6AMk/edit?usp=sharing


WDYT?


[1] https://redmine.wso2.com/issues/3417
[2] http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html
[3]
https://docs.google.com/a/wso2.com/presentation/d/15YyXzpj877LHmZtPQGIidgh-wnBVStiBTBN5oci6AMk/edit?usp=sharing
[4]
https://docs.google.com/a/wso2.com/spreadsheets/d/1XVlYOp6grJKX4qPbk96QlyUN6VlCrPf1xo2fnE4gzvY/edit#gid=0

-- 
*Pubudu Dissanayake*
 Software Engineer

WSO2 Inc.; http://wso2.com
lean.enterprise.middleware
Mob: + 94 775 503 304

Blog: http://geekdetected.wordpress.com/
Linkedin: *http://lk.linkedin.com/in/pubududissanayake*
http://lk.linkedin.com/in/pubududissanayake
Flickr : https://www.flickr.com/photos/pubudufx/
Twitter: https://twitter.com/GeekInAction
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [Progress] HTTP Session Persistence for WSO2 Application Server

2014-11-16 Thread Afkham Azeez
On Mon, Nov 17, 2014 at 8:53 AM, Pubudu Dissanayake pubu...@wso2.com
wrote:

 CarbonTomcatSessionManager


What if you simply improve CarbonTomcatSessionManager to support
persistence as well, rather than writing a new class? If you want to turn
off persistence, you can have a parameter.


-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* http://www.apache.org/*
*email: **az...@wso2.com* az...@wso2.com
* cell: +94 77 3320919blog: **http://blog.afkham.org*
http://blog.afkham.org
*twitter: **http://twitter.com/afkham_azeez*
http://twitter.com/afkham_azeez
*linked-in: **http://lk.linkedin.com/in/afkhamazeez
http://lk.linkedin.com/in/afkhamazeez*

*Lean . Enterprise . Middleware*
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [Progress] HTTP Session Persistence for WSO2 Application Server

2014-11-16 Thread Pubudu Dissanayake
On Mon, Nov 17, 2014 at 10:06 AM, Afkham Azeez az...@wso2.com wrote:


 On Mon, Nov 17, 2014 at 8:53 AM, Pubudu Dissanayake pubu...@wso2.com
 wrote:

 ​​
 CarbonTomcatSessionManager


 What if you simply improve CarbonTomcatSessionManager to support
 persistence as well, rather than writing a new class? If you want to turn
 off persistence, you can have a parameter.

 ​​CarbonTomcatSessionManager [1]
http://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/webapp-mgt/org.wso2.carbon.webapp.mgt/4.2.2/src/main/java/org/wso2/carbon/webapp/mgt/CarbonTomcatSessionManager.javadoesn't
support persistence features provided by tomcat, it extends StandardManager
[2]
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/StandardManager.java?av=f
as its base class.​ However PersistentManager [3]
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/PersistentManager.java
extends PersistentManagerBase [4]
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/PersistentManagerBase.java
as its base class thus it contains all persistence related store
configurations. Because StandardManager and PersistentManager are two
different implementations, we can't use ​​CarbonTomcatSessionManager to
support persistence. And we can configure persistence easily by separating
these two implementations.

WDYT?

[1]
http://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/webapp-mgt/org.wso2.carbon.webapp.mgt/4.2.2/src/main/java/org/wso2/carbon/webapp/mgt/CarbonTomcatSessionManager.java
[2]
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/StandardManager.java?av=f
[3]
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/PersistentManager.java
[4]
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/PersistentManagerBase.java




-- 
*Pubudu Dissanayake*
 Software Engineer

WSO2 Inc.; http://wso2.com
lean.enterprise.middleware
Mob: + 94 775 503 304

Blog: http://geekdetected.wordpress.com/
Linkedin: *http://lk.linkedin.com/in/pubududissanayake*
http://lk.linkedin.com/in/pubududissanayake
Flickr : https://www.flickr.com/photos/pubudufx/
Twitter: https://twitter.com/GeekInAction
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [Progress] HTTP Session Persistence for WSO2 Application Server

2014-11-16 Thread Afkham Azeez
So globally switching the SessionManager can be done by editing the global
context.xml file?

On Mon, Nov 17, 2014 at 11:41 AM, Pubudu Dissanayake pubu...@wso2.com
wrote:



 On Mon, Nov 17, 2014 at 10:06 AM, Afkham Azeez az...@wso2.com wrote:


 On Mon, Nov 17, 2014 at 8:53 AM, Pubudu Dissanayake pubu...@wso2.com
 wrote:

 ​​
 CarbonTomcatSessionManager


 What if you simply improve CarbonTomcatSessionManager to support
 persistence as well, rather than writing a new class? If you want to turn
 off persistence, you can have a parameter.

 ​​CarbonTomcatSessionManager [1]
 http://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/webapp-mgt/org.wso2.carbon.webapp.mgt/4.2.2/src/main/java/org/wso2/carbon/webapp/mgt/CarbonTomcatSessionManager.javadoesn't
 support persistence features provided by tomcat, it extends StandardManager
 [2]
 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/StandardManager.java?av=f
 as its base class.​ However PersistentManager [3]
 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/PersistentManager.java
 extends PersistentManagerBase [4]
 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/PersistentManagerBase.java
 as its base class thus it contains all persistence related store
 configurations. Because StandardManager and PersistentManager are two
 different implementations, we can't use ​​CarbonTomcatSessionManager to
 support persistence. And we can configure persistence easily by separating
 these two implementations.

 WDYT?

 [1]
 http://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/webapp-mgt/org.wso2.carbon.webapp.mgt/4.2.2/src/main/java/org/wso2/carbon/webapp/mgt/CarbonTomcatSessionManager.java
 [2]
 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/StandardManager.java?av=f
 [3]
 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/PersistentManager.java
 [4]
 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/PersistentManagerBase.java




 --
 *Pubudu Dissanayake*
  Software Engineer

 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware
 Mob: + 94 775 503 304

 Blog: http://geekdetected.wordpress.com/
 Linkedin: *http://lk.linkedin.com/in/pubududissanayake*
 http://lk.linkedin.com/in/pubududissanayake
 Flickr : https://www.flickr.com/photos/pubudufx/
 Twitter: https://twitter.com/GeekInAction




-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* http://www.apache.org/*
*email: **az...@wso2.com* az...@wso2.com
* cell: +94 77 3320919blog: **http://blog.afkham.org*
http://blog.afkham.org
*twitter: **http://twitter.com/afkham_azeez*
http://twitter.com/afkham_azeez
*linked-in: **http://lk.linkedin.com/in/afkhamazeez
http://lk.linkedin.com/in/afkhamazeez*

*Lean . Enterprise . Middleware*
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [Progress] HTTP Session Persistence for WSO2 Application Server

2014-11-16 Thread Afkham Azeez
Ok, go ahead with your implementation.

On Mon, Nov 17, 2014 at 11:49 AM, Afkham Azeez az...@wso2.com wrote:

 So globally switching the SessionManager can be done by editing the global
 context.xml file?

 On Mon, Nov 17, 2014 at 11:41 AM, Pubudu Dissanayake pubu...@wso2.com
 wrote:



 On Mon, Nov 17, 2014 at 10:06 AM, Afkham Azeez az...@wso2.com wrote:


 On Mon, Nov 17, 2014 at 8:53 AM, Pubudu Dissanayake pubu...@wso2.com
 wrote:

 ​​
 CarbonTomcatSessionManager


 What if you simply improve CarbonTomcatSessionManager to support
 persistence as well, rather than writing a new class? If you want to turn
 off persistence, you can have a parameter.

 ​​CarbonTomcatSessionManager [1]
 http://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/webapp-mgt/org.wso2.carbon.webapp.mgt/4.2.2/src/main/java/org/wso2/carbon/webapp/mgt/CarbonTomcatSessionManager.javadoesn't
 support persistence features provided by tomcat, it extends StandardManager
 [2]
 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/StandardManager.java?av=f
 as its base class.​ However PersistentManager [3]
 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/PersistentManager.java
 extends PersistentManagerBase [4]
 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/PersistentManagerBase.java
 as its base class thus it contains all persistence related store
 configurations. Because StandardManager and PersistentManager are two
 different implementations, we can't use ​​CarbonTomcatSessionManager to
 support persistence. And we can configure persistence easily by separating
 these two implementations.

 WDYT?

 [1]
 http://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/webapp-mgt/org.wso2.carbon.webapp.mgt/4.2.2/src/main/java/org/wso2/carbon/webapp/mgt/CarbonTomcatSessionManager.java
 [2]
 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/StandardManager.java?av=f
 [3]
 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/PersistentManager.java
 [4]
 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.0/org/apache/catalina/session/PersistentManagerBase.java




 --
 *Pubudu Dissanayake*
  Software Engineer

 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware
 Mob: + 94 775 503 304

 Blog: http://geekdetected.wordpress.com/
 Linkedin: *http://lk.linkedin.com/in/pubududissanayake*
 http://lk.linkedin.com/in/pubududissanayake
 Flickr : https://www.flickr.com/photos/pubudufx/
 Twitter: https://twitter.com/GeekInAction




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/*
 *email: **az...@wso2.com* az...@wso2.com
 * cell: +94 77 3320919 %2B94%2077%203320919blog: *
 *http://blog.afkham.org* http://blog.afkham.org
 *twitter: **http://twitter.com/afkham_azeez*
 http://twitter.com/afkham_azeez
 *linked-in: **http://lk.linkedin.com/in/afkhamazeez
 http://lk.linkedin.com/in/afkhamazeez*

 *Lean . Enterprise . Middleware*




-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* http://www.apache.org/*
*email: **az...@wso2.com* az...@wso2.com
* cell: +94 77 3320919blog: **http://blog.afkham.org*
http://blog.afkham.org
*twitter: **http://twitter.com/afkham_azeez*
http://twitter.com/afkham_azeez
*linked-in: **http://lk.linkedin.com/in/afkhamazeez
http://lk.linkedin.com/in/afkhamazeez*

*Lean . Enterprise . Middleware*
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [Progress] HTTP Session Persistence for WSO2 Application Server

2014-11-16 Thread Pubudu Dissanayake
On Mon, Nov 17, 2014 at 11:52 AM, Afkham Azeez az...@wso2.com wrote:

 Ok, go ahead with your implementation.


​Noted​



 On Mon, Nov 17, 2014 at 11:49 AM, Afkham Azeez az...@wso2.com wrote:

 So globally switching the SessionManager can be done by editing the
 global context.xml file?


Indeed, we can configure it by editing global context.xml​
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture