refactoring the session tracking code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

refactoring the session tracking code

Philippe Marschall
Hi

As discussed previously I'm not very happy with our current session
tracking code. Mainly due to how it is woven into
WARegistry/WAApplication. That makes it impossible to change without
subclassing WAApplication. There are several tracking schemes that we
don't support currently and are hard to do with the current code.

 - cookies only, I know some of our corporate "customers" want/need/do
this, they either need to change code or write custom code, it is
unfortunate that we don't support this out of the box
 - ssl session id based
 - ip based for crawlers [1]

The proposed refactoring is to move this functionality to a strategy
object responsible for extracting the session key from a request and
adding the session key to a response or action URL. This has some
overlap with the WARegistry/WAApplication refactoring that Julian is
doing but it should not be too hard to merge. The work would be done
in the WIP repository.

[1] http://www.tomcatexpert.com/blog/2011/05/18/crawler-session-manager-valve

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: refactoring the session tracking code

Julian Fitzell-2
Sounds great and right along the lines of what I was thinking. The merge point will be that this new class will probably end up being used by a filter instead of by Application. I may restart my changes from scratch anyway, since I decided I want to commit some of the earlier work that led to it as a separate commit. Depending on timing, I may just be able to do it again starting from your work.

Are you imagining a single class that both extracts the key from the request and can add it for the response? (not sure how the heck that would work generically since it could be a cookie, or a change to the handler url, or...)

I was also thinking your change to support ;s= could be cool in terms of allowing the session to be better bound/namespaced to the application that created it, but there may be plenty of other reasons why that's a bad idea...

Julian

On Sun, Jul 10, 2011 at 4:20 PM, Philippe Marschall <[hidden email]> wrote:
Hi

As discussed previously I'm not very happy with our current session
tracking code. Mainly due to how it is woven into
WARegistry/WAApplication. That makes it impossible to change without
subclassing WAApplication. There are several tracking schemes that we
don't support currently and are hard to do with the current code.

 - cookies only, I know some of our corporate "customers" want/need/do
this, they either need to change code or write custom code, it is
unfortunate that we don't support this out of the box
 - ssl session id based
 - ip based for crawlers [1]

The proposed refactoring is to move this functionality to a strategy
object responsible for extracting the session key from a request and
adding the session key to a response or action URL. This has some
overlap with the WARegistry/WAApplication refactoring that Julian is
doing but it should not be too hard to merge. The work would be done
in the WIP repository.

[1] http://www.tomcatexpert.com/blog/2011/05/18/crawler-session-manager-valve

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev


_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: refactoring the session tracking code

Julian Fitzell-2
In reply to this post by Philippe Marschall
If you can make it non-session specific (i.e. KeyExtractor or something) then I could reuse it for WARegistry in my refactoring as well. I'm still considering dropping the class entirely, but if this functionality was extracted and reusable, it could be kept around with only a few small methods I think.

On Sun, Jul 10, 2011 at 4:20 PM, Philippe Marschall <[hidden email]> wrote:
Hi

As discussed previously I'm not very happy with our current session
tracking code. Mainly due to how it is woven into
WARegistry/WAApplication. That makes it impossible to change without
subclassing WAApplication. There are several tracking schemes that we
don't support currently and are hard to do with the current code.

 - cookies only, I know some of our corporate "customers" want/need/do
this, they either need to change code or write custom code, it is
unfortunate that we don't support this out of the box
 - ssl session id based
 - ip based for crawlers [1]

The proposed refactoring is to move this functionality to a strategy
object responsible for extracting the session key from a request and
adding the session key to a response or action URL. This has some
overlap with the WARegistry/WAApplication refactoring that Julian is
doing but it should not be too hard to merge. The work would be done
in the WIP repository.

[1] http://www.tomcatexpert.com/blog/2011/05/18/crawler-session-manager-valve

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev


_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev