[Zope-dev] Session
How can I use this line ? Do I need any product ? dtml-call "Session.set('myVariable','somevalue') Anderson ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Specialists and __bobo_traverse__
I'm still lost as to when __bobo_traverse__ is checked for object traversal and when not. I have very simple piece of SkinScript: WITH SELF COMPUTE __bobo_traverse__ = traversal_method. Looking at the traverse method in BaseRequest.py it looks to me as if an object is always checked if it has a __bobo_traverse__ method but this is not what is happening. If I manually type in a url, say path.to.specialist/dataskin1, where dataskin1 exists, my traversal_method is not called. When I type in path.to.specialist/dataskin2, where dataskin2 does not exist then my traversal_method is called. Noticing that the traversal_method is called when an object can not be found I tried path.to.specialist/dataskin1/dataskin2, where dataskin1 is in the specialist's rack but dataskin2 is in another specialist's rack and will therefor not be found. In this case my traversal_method was not called. If it was then I could retrieve it from the appropriate specialist. I hope the above is clear because I'm somewhat desperate at the moment. If I'm trying the impossible, a simple "forget about it" will also do. Roch ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Specialists and __bobo_traverse__
It sounds to me like you're trying to have SkinScript supply a bobo_traverse for the Specialist itself, and this you cannot do. (There are other ways to change a Specialist's bobo_traverse behavior, but SkinScript is not one of them.) The SkinScript you're doing is meaningful only if you want to go to specialist/skin1/something, in which case your traversal_method should be called to process "something". I don't have the slightest idea what you're trying to accomplish here - I probably missed the beginning of this thread. Do you want to change the way the specialist processes the string "dataskin1", or the way dataskin1 processes the URL component that comes next? Each requires a different approach. At 07:28 PM 1/16/01 +0200, Roch'e Compaan wrote: I'm still lost as to when __bobo_traverse__ is checked for object traversal and when not. I have very simple piece of SkinScript: WITH SELF COMPUTE __bobo_traverse__ = traversal_method. Looking at the traverse method in BaseRequest.py it looks to me as if an object is always checked if it has a __bobo_traverse__ method but this is not what is happening. If I manually type in a url, say path.to.specialist/dataskin1, where dataskin1 exists, my traversal_method is not called. When I type in path.to.specialist/dataskin2, where dataskin2 does not exist then my traversal_method is called. Noticing that the traversal_method is called when an object can not be found I tried path.to.specialist/dataskin1/dataskin2, where dataskin1 is in the specialist's rack but dataskin2 is in another specialist's rack and will therefor not be found. In this case my traversal_method was not called. If it was then I could retrieve it from the appropriate specialist. I hope the above is clear because I'm somewhat desperate at the moment. If I'm trying the impossible, a simple "forget about it" will also do. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Massive scalability
While that would work for the simple object case, I find the prospect of storing a bunch of BLOBs (for the image data of the Photos) in an RDBMS to be *most* un-appetizing. Storing them on the server's file-system seems in-elegant as well. Okey dokey, just a suggestion. I have heard people talk about large ZOBD's but once I go over a 10,000 object mark I just find a RDBMS easier myself. Go for it good luck! Does anyone know of any hidden 'gotchas' when dealing with this many objects, regardless of the hit-load on the system? Mostly starting and stopping Zope, the 2gb limit (which can be avoided), pulling objects back out with complicated queries are my biggest gripes. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] manage_changeProperties in a loop
Arno Gross wrote: Suppose I have a list of existing folder objects and depending on their index in the list I want to set a property called 'rang'. I assumed you could something like this: dtml-call "REQUEST.set('rangList','folder1;folder2;folder2')" (normally the list comes from outside) dtml-in " _.string.split(rangList,';')" dtml-with "_.getitem('sequence-item')" Here, you're getting an item with the literal id 'sequence-item'. What you mean is to get the item with the id described by the variable sequence-item. So, use: dtml-with "_.getitem(_['sequence-item'])" Hope that helps. This really is a [EMAIL PROTECTED] question, not a [EMAIL PROTECTED] question. Please do try to choose the appropriate list for the question. Thanks. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Specialists and __bobo_traverse__
It sounds to me like you're trying to have SkinScript supply a bobo_traverse for the Specialist itself, and this you cannot do. (There are other ways to change a Specialist's bobo_traverse behavior, but SkinScript is not one of them.) The SkinScript you're doing is meaningful only if you want to go to specialist/skin1/something, in which case your traversal_method should be called to process "something". This is exactly what I want to do ie. process "something". I don't have the slightest idea what you're trying to accomplish here - I probably missed the beginning of this thread. Do you want to change the way the specialist processes the string "dataskin1", or the way dataskin1 processes the URL component that comes next? Each requires a different approach. The best way to describe this is with an example I suppose. I have a specialist "Products" and nested within "Products" is another specialist "Modules". The current status quo: I go to a Product dataskin with a url like Products/product_id. I go to a Module dataskin with a url like Products/Modules/module_id Where I want to be: The url to the Product dataskin stays the same. I go to a Module dataskin with url like Products/product_id/module_id As I see it the module_id is like the "something" you mentioned above. The module dataskin would obviously not be found by the Products specialist, and in that case I simply want to tell it to go look in the Modules specialist for the module. I hope this makes more sense, if not I'll be glad to explain more. Many thanks Roch ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ZCatalog with ZClass
Hello, everyone, It seems that many of you have used ZCatalog pretty well. My problem is that I'd like a ZClass (of a Product) to subclass CatalogAware, and implement all the index and search inside the Product. That means I don't want to do any DTML method stuff outside of the Product. Could anyone tell me how to do it? I can't find anything like API document. I don't have to read through the "Catalog.py" stuff, do I? Thanks in advance. Cheers... Lily ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Massive scalability
Michael Bernstein wrote: So, again: Has anyone run up against any performance or other limitations regarding large numbers (hundreds of thousands or more) of objects stored within the ZODB either in a BTree Folder or a Rack? I was looking into the same issues recently, but for a much smaller set of data (5ish). In my tests ZPatterns/binary-trees scaled well for storage and retrieval. But ZCatalog did not. It was basically useless for partial matching searches (taking many minutes for searches that retrieved more than 100 matches). I was also concerned about the indexing overhead. It doesn't scale well when changing/adding many things at a time (we might have bulk adds/changes). I ended up deciding to go with a RDBMS backend for data storage with a ZPatterns interface. SkinScripts work so well for this that I'm actually glad I switched. It simplified my design and implementation immensely. -- John Eikenberry [[EMAIL PROTECTED] - http://zhar.net] __ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Massive scalability
Does ZPatterns provide a nice interface / way for storing classes in a RDBMS? I have to say using an RDBMS is not as transparent as I would like, this may may improve it. Finally a reason for me to ZPatterns... -- Andy McKay. - Original Message - From: "John Eikenberry" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: "Michael Bernstein" [EMAIL PROTECTED] Sent: Tuesday, January 16, 2001 3:22 PM Subject: Re: [Zope-dev] Massive scalability Michael Bernstein wrote: So, again: Has anyone run up against any performance or other limitations regarding large numbers (hundreds of thousands or more) of objects stored within the ZODB either in a BTree Folder or a Rack? I was looking into the same issues recently, but for a much smaller set of data (5ish). In my tests ZPatterns/binary-trees scaled well for storage and retrieval. But ZCatalog did not. It was basically useless for partial matching searches (taking many minutes for searches that retrieved more than 100 matches). I was also concerned about the indexing overhead. It doesn't scale well when changing/adding many things at a time (we might have bulk adds/changes). I ended up deciding to go with a RDBMS backend for data storage with a ZPatterns interface. SkinScripts work so well for this that I'm actually glad I switched. It simplified my design and implementation immensely. -- John Eikenberry [[EMAIL PROTECTED] - http://zhar.net] __ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Massive scalability
John Eikenberry wrote: Michael Bernstein wrote: So, again: Has anyone run up against any performance or other limitations regarding large numbers (hundreds of thousands or more) of objects stored within the ZODB either in a BTree Folder or a Rack? I was looking into the same issues recently, but for a much smaller set of data (5ish). In my tests ZPatterns/binary-trees scaled well for storage and retrieval. But ZCatalog did not. It was basically useless for partial matching searches (taking many minutes for searches that retrieved more than 100 matches) Was this true even for cases where the batch size was smaller than 100? For example, if a search returns over 100 results but the batch size is only 20 (so that only 20 results at a time are displayed), do you still get the performance hit? [snip] I ended up deciding to go with a RDBMS backend for data storage with a ZPatterns interface. SkinScripts work so well for this that I'm actually glad I switched. It simplified my design and implementation immensely. So you're saying that you are doing all searching using SQL statements, and not just object retreival and storage, correct? How are you handling full text searches? Cheers, Michael Bernstein. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Massive scalability
Andy McKay wrote: While that would work for the simple object case, I find the prospect of storing a bunch of BLOBs (for the image data of the Photos) in an RDBMS to be *most* un-appetizing. Storing them on the server's file-system seems in-elegant as well. Okey dokey, just a suggestion. I have heard people talk about large ZOBD's but once I go over a 10,000 object mark I just find a RDBMS easier myself. Go for it good luck! Thanks! I appreciate different points of view on this problem, even if you have different 'comfort zones'. Does anyone know of any hidden 'gotchas' when dealing with this many objects, regardless of the hit-load on the system? Mostly starting and stopping Zope, [snip] Are you saying that Zope's startup and shutdown time is affected by the size of the ZODB? Thanks, Michael Bernstein. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Massive scalability
RDM wrote: On Mon, 15 Jan 2001, Michael Bernstein wrote: as Squishdot). Adding a dependency on an RDBMS or requiring additional setup on the server's FS seems a step in the wrong direction. [...] So the question remains: Will either approach (within the ZODB) allow me to scale the application to hundreds of thousands (or even millions) of objects indexed in a ZCatalog? [...] I know that the ZCatalog/ObjectManager approach used by Squishdot will scale to over 9,000 objects (the number of postings to date at technocrat.net), So I'm reasonably certain that my proposed ZCatalog/BTree Folder approach will be at least as scalable. I'm slightly less confident about the Specialist/Rack approach, because I don't know of any sites that have used them to store that many objects in the ZODB, but only slightly. My understanding is that the point of ZPatterns is to hide the data storage implementation from the application.[snip] The point being that you can *change your mind* later, with minimal disruption to your application. Not only that, but people who *use* your product can make their own decision about where to store the data. So by using ZPatterns you [...] let the users of your product use an RDBMs if that works better for them. Very good points, and ones that I will keep in mind. Thanks. In addition, it seems to me that your comments about ZCatalog+BTree apply equally well to ZPatterns, since you can use the Catalog to index stuff stored in a rack through the use of appropriate triggers, and it is my understanding that the default in-ZODB rack storage uses BTree internally. I do not know if BTree folders and Racks share the same B-Tree implementation, which is why I qualified my statement as 'slightly less confident'. Unfortunately I don't have much input on your question about real-life scalability...the most I've done is stored 6 small objects in a hierarchy of zope folders, indexed by the catalog, with no perceptable slowdown in search or retrieval speed. Hmm. John Eikenberry mentioned a slowdown with about 50,000 objects on partial-match searches, but I don't know how simple/complex the objects were, or how many atributes were being indexed. How many indexes of various types was your ZCatalog maintaining on your objects? Thanks, Michael Bernstein. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Massive scalability
Andy McKay wrote: Does ZPatterns provide a nice interface / way for storing classes in a RDBMS? I have to say using an RDBMS is not as transparent as I would like, this may may improve it. Finally a reason for me to ZPatterns... The best way to get a taste is to try it out. The easiest way to do this is to install LoginManager plus the DB/DA. Then follow the instructions in... LoginManager with SQL and Skinscript http://www.zope.org/Members/dlpierson/sqlLogin I had it up and running pretty quickly following these instructions. More generally the combo of sql-methods and ZPatterns (ie. skinscripts) seems pretty compelling. I've used SQLMethods pretty extensively for the past 18 months. They have definate limitations which is why I'm working on the object based system. The ZPatterns abstraction seems to provide the best of both worlds. You get the nice parts of SQLMethods; timed cache, dtml query syntax and web viewable sql querries, plus you get a nice object abstractaction (much better than plugable brains). SkinScripts allow for easy attribute and trigger handling, basically like a simple object description language. If you can't tell, I'm pretty sold on ZPatterns. And once deciding that an RDBMS was the best way to go for data storage, it fit into the 'pattern' very nicely. I haven't deployed it yet, but its pretty fun to work on. :) -- John Eikenberry [[EMAIL PROTECTED] - http://zhar.net] __ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog with ZClass
Lily Li wrote: Hello, everyone, It seems that many of you have used ZCatalog pretty well. My problem is that I'd like a ZClass (of a Product) to subclass CatalogAware, and implement all the index and search inside the Product. That means I don't want to do any DTML method stuff outside of the Product. What you probably want is to create a repository that subclasses ZCatalog as is described in this HowTo: http://www.zope.org/Members/tseaver/inherit_ZCatalog And then add your CatalogAware ZClasses into it. Then you can set up your ZCatalog/ObjectManager with search methods. HTH, Michael Bernstein. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Massive scalability
Michael Bernstein wrote: John Eikenberry wrote: I was looking into the same issues recently, but for a much smaller set of data (5ish). In my tests ZPatterns/binary-trees scaled well for storage and retrieval. But ZCatalog did not. It was basically useless for partial matching searches (taking many minutes for searches that retrieved more than 100 matches) Was this true even for cases where the batch size was smaller than 100? For example, if a search returns over 100 results but the batch size is only 20 (so that only 20 results at a time are displayed), do you still get the performance hit? Short answer: yes Long answer: If you check out the source and/or hit it with the profiler you'll see that the way the partial search works is to first do a more general search then to limit the hits as much as possible via regex's. Both these steps have to happen no matter the batch size, and this is where you take the performance hit. [snip] I ended up deciding to go with a RDBMS backend for data storage with a ZPatterns interface. SkinScripts work so well for this that I'm actually glad I switched. It simplified my design and implementation immensely. So you're saying that you are doing all searching using SQL statements, and not just object retreival and storage, correct? How are you handling full text searches? Yes. I'll use MySQL's built in pattern matching facilities. It can do full text searches with partial matching, and it can do this fast. I'm working on a system that will return the DataSkin's in responce to the query. Allowing me to deal with just the objects yet use all of MySQL's facilities. I'v just started to work on this as part of a larger project, but I'm doing it full time and should have something fairly soon. My company is very free software friendly, so I'll be able to share it once its ready. If you happen to be interested. -- John Eikenberry [[EMAIL PROTECTED] - http://zhar.net] __ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )