Hi all, A new version (0.8) of the Core Session Tracking product has been released. The product allows you to associate state for an anonymous user across requests. This version fixes some session expiry bugs as well as allows for session "onStart" and "onEnd" events. Highly recommended if you're now running a previous version of the product. More info is available from http://www.zope.org/Members/mcdonc/Products/CoreSessionTracking Thanks, - C
Chris McDonough wrote:
A new version (0.8) of the Core Session Tracking product has been released. The product allows you to associate state for an anonymous user across requests. This version fixes some session expiry bugs as well as allows for session "onStart" and "onEnd" events. Highly recommended if you're now running a previous version of the product.
Chris, IIRC, this release requires you to delete and re-create some stuff. Would I be right in guessing that it's just the session id managers that need to be deleted and recreated? cheers, Chris
Chris Withers wrote:
Chris McDonough wrote:
A new version (0.8) of the Core Session Tracking product has been released. The product allows you to associate state for an anonymous user across requests. This version fixes some session expiry bugs as well as allows for session "onStart" and "onEnd" events. Highly recommended if you're now running a previous version of the product.
Chris,
IIRC, this release requires you to delete and re-create some stuff.
Would I be right in guessing that it's just the session id managers that need to be deleted and recreated?
cheers,
The session id manager(s) definitely need to be deleted / recreated. You get "loop over non-sequence" errors if you do not. I zapped my sessiondatamanagers first, so I am not sure about those. -- Jim Washington
I should have put this in the announcement, but yes, you should recreate all your sessioning-related objects. It's detailed in the docs under upgrading. ----- Original Message ----- From: "Jim Washington" <jwashin@vt.edu> To: "Chris Withers" <chrisw@nipltd.com> Cc: <zope@zope.org> Sent: Wednesday, April 04, 2001 10:12 AM Subject: Re: [Zope] ANN: Core Session Tracking 0.8 released
Chris Withers wrote:
Chris McDonough wrote:
A new version (0.8) of the Core Session Tracking product has been
released.
The product allows you to associate state for an anonymous user across requests. This version fixes some session expiry bugs as well as allows for session "onStart" and "onEnd" events. Highly recommended if you're now running a previous version of the product.
Chris,
IIRC, this release requires you to delete and re-create some stuff.
Would I be right in guessing that it's just the session id managers that need to be deleted and recreated?
cheers,
The session id manager(s) definitely need to be deleted / recreated. You get "loop over non-sequence" errors if you do not. I zapped my sessiondatamanagers first, so I am not sure about those.
-- Jim Washington
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi! On Wed, 4 Apr 2001, Chris McDonough wrote:
I should have put this in the announcement, but yes, you should recreate all your sessioning-related objects. It's detailed in the docs under upgrading.
Not the best way for upgarding :) Shouldn't every new version of a Product (not only Sessions) has a script/method for upgarding? Like manage_convertBTree or such... Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
Oleg Broytmann wrote:
Not the best way for upgarding :) Shouldn't every new version of a Product (not only Sessions) has a script/method for upgarding? Like manage_convertBTree or such...
Gimme an hour or two, I'm working on it ;-) cheers, Chris
You're right. But it's still a development release, and I'd rather spend the time getting it right than creating conversion routines. Post-1.0 releases will have conversion scripts if something big changes. Besides, Chris is working on it. ;-) - C ----- Original Message ----- From: "Oleg Broytmann" <phd@phd.fep.ru> To: "Chris McDonough" <chrism@digicool.com> Cc: "Chris Withers" <chrisw@nipltd.com>; "Zope Mailing List" <zope@zope.org> Sent: Wednesday, April 04, 2001 10:27 AM Subject: Re: [Zope] ANN: Core Session Tracking 0.8 released
Hi!
On Wed, 4 Apr 2001, Chris McDonough wrote:
I should have put this in the announcement, but yes, you should recreate all your sessioning-related objects. It's detailed in the docs under upgrading.
Not the best way for upgarding :) Shouldn't every new version of a Product (not only Sessions) has a script/method for upgarding? Like manage_convertBTree or such...
Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
Chris McDonough wrote:
Besides, Chris is working on it. ;-)
Ignore the surnames and everything is alright... gak! II zodbroot.ZopeFind(self,obj_metatypes=['Session Id Manager']) ...returns nothing, even though I know there are quite a few id managers lurking. Any idea what gives? cheers, Chris PS: Chris: your mail server / local machine is about 30 mins out, I;m sending you replies before I should have got your message... confusing :-S PPS: Thanks for the OOBTree thing, got me scared there for a minute ;-) Are IOBTree's more efficient? If so, I wish I could use integers for catalog UID's like I used to :-S Any way I can just give catalog an object and say 'gimme a RID back for this' that I can then use? PPPS: Er... sorry, this is getting silly, I'll put it in a seperate post...
zodbroot.ZopeFind(self,obj_metatypes=['Session Id Manager'])
...returns nothing, even though I know there are quite a few id managers lurking.
Works for me... just tried it from the command line like this: cd lib/python; python
import Zope app = Zope.app() app.ZopeFind(app, obj_metatypes=['Session Id Manager']) [('session_id_mgr', <SessionIdManager instance at 869e1d8>)]
Any idea what gives?
cheers,
Chris
PS: Chris: your mail server / local machine is about 30 mins out, I;m
sending
you replies before I should have got your message... confusing :-S
Just changed the time.
PPS: Thanks for the OOBTree thing, got me scared there for a minute ;-) Are IOBTree's more efficient? If so, I wish I could use integers for catalog UID's like I used to :-S Any way I can just give catalog an object and say 'gimme a RID back for this' that I can then use?
IOBTrees are significantly more efficient (or so Jim tells me). I don't think there's any facility in the catalog to provide UIDs based on RID, although I imagine you could look at the catalogObject method of Catalog.py to see how the catalog assigns RIDs and use the same algorithm.
Chris McDonough wrote:
cd lib/python; python
import Zope app = Zope.app() app.ZopeFind(app, obj_metatypes=['Session Id Manager']) [('session_id_mgr', <SessionIdManager instance at 869e1d8>)]
Waaagh! Doesn't for me :-( external method: def updateall(self,updatemethod, metatypes=['Session Id Manager']): sss = self.ZopeFind(self,obj_metatypes=metatypes) print sss when I do http://mysite.com/updateall, I get: [] ...printed from the Zope console... what am I doing wrong?
PS: Chris: your mail server / local machine is about 30 mins out, I;m sending you replies before I should have got your message... confusing :-S
Just changed the time.
:-)
IOBTrees are significantly more efficient (or so Jim tells me). I don't think there's any facility in the catalog to provide UIDs based on RID, although I imagine you could look at the catalogObject method of Catalog.py to see how the catalog assigns RIDs and use the same algorithm.
Hmmm... I didn't exlain myself very well. In one of the places we're using a catalog, we don't _have_ a RID. We had been generating integers and using those as both keys in a BTree and RID's for the catalog. Now catalog wants RID's to be strings but OOBTrees are inefficient :-S ...then I thought 'well, UIDs are just what we want' but I'm not sure there's a way to just give ZCatalog an object (without supplying a RID) and have ZCatalog return the RID... any ideas? cheers, Chris
external method:
def updateall(self,updatemethod, metatypes=['Session Id Manager']): sss = self.ZopeFind(self,obj_metatypes=metatypes) print sss
when I do http://mysite.com/updateall, I get:
[]
...printed from the Zope console... what am I doing wrong?
Nothing, AFAICT. Looking in to it.
Hmmm... I didn't exlain myself very well. In one of the places we're using a catalog, we don't _have_ a RID. We had been generating integers and using those as both keys in a BTree and RID's for the catalog. Now catalog wants RID's to be strings but OOBTrees are inefficient :-S
...then I thought 'well, UIDs are just what we want' but I'm not sure there's a way to just give ZCatalog an object (without supplying a RID) and have ZCatalog return the RID... any ideas?
Why are you worrying about it? I never said that OOBTrees are inefficient, I just said that IOBTrees are *more* efficient than OOBTrees. This sounds like a premature optimization. Using the Zope profiler (in the debug panel) can confirm this, it's quite handy. You always have a RID (it's autogenerated for each item added to the catalog). And you always have a UID as well (it's what you pass in to catalog_object -- and in the latest ZCatalog release it doesn't need to be passed in, it's the "getPhysicalPath" of the object passed in if has one). If your objects are persistent and traversable, it's best just to use the defaults from the Catalog and pass the UID in as the physical path (or let the catalog figure it out for you). That said, a catalog UID can be any sort of object... it doesn't need to be a string. If you don't use the physical path as a UID, you need to do a few more things manually. Catalog RIDs are an implementation detail and probably shouldn't be used outside of the catalog.
Chris: app.ZopeFind(app, obj_metatypes=['Session Id Manager'], search_sub=1)
Works for me... just tried it from the command line like this:
cd lib/python; python
import Zope app = Zope.app() app.ZopeFind(app, obj_metatypes=['Session Id Manager']) [('session_id_mgr', <SessionIdManager instance at 869e1d8>)]
Chris, As an aside, this command line access looks very nice. I am very curious.. Please how do you do this? Since Zope is already running Python where are you launching this from? Is there some other tool or modifications needed to access Zope like this? What are the limits on what one can do.. Especially for getting up to speed on Zope/Python syntax, Python script logic etc, general API familiarity, PyZope interactive command line looks like a great advantage. thanks - Jason ___________________________________________________________ Jason CUNLIFFE = NOMADICS['Interactive Art and Technology']
Jason Cunliffe wrote:
Works for me... just tried it from the command line like this:
cd lib/python; python
import Zope app = Zope.app() app.ZopeFind(app, obj_metatypes=['Session Id Manager']) [('session_id_mgr', <SessionIdManager instance at 869e1d8>)]
Chris,
As an aside, this command line access looks very nice. I am very curious..
Please how do you do this?
You either need to: - Shut down Zope - or be running ZEO I have a question too: How do you do the above when your Data.fs is INSTANCE_HOME'd? Surely the above will import the Data.fs from SOFTWARE_HOME (which is still brand new in my case ;-) cheers, Chris
As an aside, this command line access looks very nice. I am very curious..
Please how do you do this?
You either need to:
- Shut down Zope - or be running ZEO
That's right. The basics are: cd to your Zope's lib/python invoke Python do "import Zope" do "app = Zope.app()" "app" is now the root Zope object. call methods on app and its subobjects. Things get a little hoarky when the method depends on an acquired REQUEST (which isn't available in the environment set up by app = Zope.app()). For a workaround, see the Core Session Tracking "makerequest.py" script in the tests directory.
I have a question too:
How do you do the above when your Data.fs is INSTANCE_HOME'd?
I *think* you can just set the INSTANCE_HOME env var? Gad, I'm not sure! Anybody?
Chris McDonough wrote:
Works for me... just tried it from the command line like this:
cd lib/python; python
import Zope app = Zope.app() app.ZopeFind(app, obj_metatypes=['Session Id Manager']) [('session_id_mgr', <SessionIdManager instance at 869e1d8>)]
Well, here's an even simpler External Method which still doesn't work: def updateall(self): return `self.ZopeFind(self,obj_metatypes=['Session Data Manager','Session Id Manager'])` What am I doing wrong? cheers, Chris
Hmmm.... def updateall(self): return `self.ZopeFind(self,obj_metatypes=['Session Data Manager','Session Id Manager'])` ...with find Data and Id managers in the ZODB root but not in folders or other folderish object. ZopeFind usually does okay with this (and the find tab in the ZODB root does indeed find everything) so what is my external method missing? cheers, Chris (what's the record for zope@zope.org posts in one day? ;-)
I'm looking in to this now... I think it's a problem with ZopeFind. ----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Chris McDonough" <chrism@digicool.com> Cc: "Zope Mailing List" <zope@zope.org> Sent: Wednesday, April 04, 2001 12:21 PM Subject: Re: [Zope] CST Updater 0.8 (weirdness better defined)
Hmmm....
def updateall(self): return `self.ZopeFind(self,obj_metatypes=['Session Data Manager','Session Id Manager'])`
...with find Data and Id managers in the ZODB root but not in folders or other folderish object.
ZopeFind usually does okay with this (and the find tab in the ZODB root does indeed find everything) so what is my external method missing?
cheers,
Chris (what's the record for zope@zope.org posts in one day? ;-)
Definitely external Session Data Containers and probably Session Data Managers need to be recreated as well. It's best to recreate all the sessioning-related objects. ----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Chris McDonough" <chrism@digicool.com> Cc: <zope@zope.org> Sent: Wednesday, April 04, 2001 9:11 AM Subject: Re: [Zope] ANN: Core Session Tracking 0.8 released
Chris McDonough wrote:
A new version (0.8) of the Core Session Tracking product has been
released.
The product allows you to associate state for an anonymous user across requests. This version fixes some session expiry bugs as well as allows for session "onStart" and "onEnd" events. Highly recommended if you're now running a previous version of the product.
Chris,
IIRC, this release requires you to delete and re-create some stuff.
Would I be right in guessing that it's just the session id managers that need to be deleted and recreated?
cheers,
Chris
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Chris McDonough wrote:
Definitely external Session Data Containers and probably Session Data Managers need to be recreated as well.
I'm writing an updater to do this which I'll make available when it works. It'll go through a ZODB and upgrade everything it needs to. External Session Data containers won't get covered 'cos I don't use them :-S cheers, Chris
Hi Chris! Thank you very much for your work! CST is a life-saver for me. Cheers, Jérôme Loisel Chris McDonough -- Mardi 03 Avril 2001 23:41:
Hi all,
A new version (0.8) of the Core Session Tracking product has been released. The product allows you to associate state for an anonymous user across requests. This version fixes some session expiry bugs as well as allows for session "onStart" and "onEnd" events. Highly recommended if you're now running a previous version of the product.
More info is available from http://www.zope.org/Members/mcdonc/Products/CoreSessionTracking
Thanks,
- C
-- Jérôme Loisel, étudiant et webmestre Lévinux: GNU/Linux pour la communauté http://www.levinux.org/
participants (6)
-
Chris McDonough -
Chris Withers -
Jason Cunliffe -
Jim Washington -
Jérôme Loisel -
Oleg Broytmann