| Summary: | support nosql sessions | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Greg Wilkins <gregw> |
| Component: | server | Assignee: | Jesse McConnell <jesse.mcconnell> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | gunnar, jesse.mcconnell, jetty-inbox, mgorovoy |
| Version: | 7.5.0 | ||
| Target Milestone: | 7.5.x | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Greg Wilkins
What are the Jetty plans for this? You you think about providing a concrete session manager implementation for MongoDB or a base DHT session manager implementation which others could extend to hook with MongoDB, Cassandra, Memcache, etc? FWIW, I'm looking at providing a session manager implementation for Memcache or Redis. Gunnar, We have a jetty-mongodb session manager in the works on the codehaus side right now. I need to get mongodb driver into CQ if we are going to bring it over here. But right now we have a fairly general layer of session manager and the mongo implementation together in one bundle. that is temporary, we might pull the general stuff over or we might just set up a general structure over at codehaus and avoid the long lagtime for CQ processing http://svn.codehaus.org/jetty/sandbox/jetty-mongodb/ You don't need the patch anymore, I believe greg's changes are on master now. so if you want to take a look I am interested in discussing further, especially if your interested in adding a couple more implementations on it. either mailing list or on this issue is good for me. Greg: I have the sandbox staged to github as well pending the creation at codehaus https://github.com/jmcc0nn3ll/org.mortbay.jetty.sandbox Greg, Commit 17ce8ec161ee9426785c31941d8b75a820e57a42 'cleaned up sessionIdManager setters' has inadvertently broken compiling of jetty-jboss module in jetty@codehaus. Please see http://jira.codehaus.org/browse/JETTY-1393. -Michael I suppose we should move the NoSQL* classes over to 7.5.0 to some module, perhaps under jetty-server with the other session classes. At the moment I think we should keep the mongodb implementations at codehaus so we don't have to muck with CQ's of mongo goop. And its a suitable integration like the rest of our hightide bits. Greg, in NoSqlSessionManager doStart() when you are creating the prefix for the contextId I don't follow what the purpose behind the hosts[0] + contextPath is trying to achieve. The test cases I am seeing all have :: as the host now. I fixed the contextPath check to include "".equals(contextPath) check so we get getting contextid's of ::* most places (when contexts are null or empty of course) But won't this cause issue when trying to loadSession from a different node if its virtual hosts are configured slightly differently, or is that a 'bad thing'...and what does it accomplish in general? Jesse, You can have multiple contexts at the same context path, but with different virtual hosts. These contexts are different contexts and must not share sessions. So adding the virtual host name, ensures they are different. note that I have merged (and deleted) the mongosessions branch from git. So master now has the base session changes needed for the mongodb module. I think the mongodb module will have to live at codehaus unless we can CQ the mongo API jars at eclipse. I got a few commits on this today, added in a unit test for tracking session saved values as I was getting some weird output related to that. turns out that was from a poor statement in a refresh, think I made that mistake last week. CQ 5306 is for the mongodb driver we need to bring this over remaining issues - we still have an issue with version not updating, it is consistently 1 on the session value saving test I made, seems that the version object coming in on save is consistently null - i saw an unsupported operation exception on the hashset returned from the session for saving all values as opposed to dirty ones but it appears to have gone away....bit concerned about that one since all I had done was toggle saveAllAttributes on...but now I don't see it, might have been an issue with invalidation though I added optional jmx support to the mongo sessions, extending the AbstractSessionManager jmx bits with a sessionStoreCount and the ability call scavenge and purge operations directly through jmx I also added a scavengeFully and purgeFully mechanism so you can first mark all existing sessions as invalid and then fully purge them without waiting for the purge thread to become active. Greg, thoughts about moving the nosql classes over to jetty-server under session? we can leave the mongo stuff at codehaus for now, but the nosql stuff could do in with the other session classes.. jesse This is committed an will be in jetty 7.5.0. I have it in trunk right now with the understanding we'll have our piggy back CQ 5306 granted by then. Gunnar, if your still interested, I am keen to discuss and work with you on an ehcache solution using these nosql api's, expanding and refining as needed. cheers (In reply to comment #12) > I have it in trunk right now with the understanding we'll have our piggy back > CQ 5306 granted by then. I'm confused. Is it trunk or master? > Gunnar, if your still interested, I am keen to discuss and work with you on an > ehcache solution using these nosql api's, expanding and refining as needed. Let me have a look and play with the MongoDB stuff first. Ehcache is not on my agenda (for now) but may be an option as well. trunk/master...old habits die hard |