Re: [Zope-dev] RE: objectIds accessiblilty and a proposal
On Mon, 18 Dec 2000 14:11:51 -0500, "Brian Lloyd" [EMAIL PROTECTED] wrote: This is something that has come up before. I propose that the real problem here is that 'objectIds' should not be web-traversable. I have, in fact, proposed this before. It caused a bit of grumbling among people using xml-rpc, who were using objectIds remotely, so we never came to closure on it. Please No. Zope security is complex enough without having to worry about different security settings depending on how a method is accessed. (And we should have a lower tolerance for complexity when it applies to security) If a user has permission to access a method then he should be able to access it any way (xmlrpc, ZPublisher, DTML, PythonMethods) Conversely, if a user is given an "Access Denied" message using one means of access (say, using ZPublisher) then he *must* also be denied using every other one. Security testing is much harder without this property. If anyone is seriously worried about this a a problem then can already deny Anonymous users the 'Access contents information' permission, and grant a proxy role to methods that generate indexes. (Indeed, this may make sense as the default configuration) Toby Dickenson [EMAIL PROTECTED] ___ 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] Performance enhancements, ZCatalog
On Wed, Dec 20, 2000 at 12:56:36AM +, Jason Spisak wrote: ZCatalog enthusiasts, I just upgraded our zope installation from 2.1.6 to 2.2.4, and the ZCatalog performance is aweful. Can someone remind me what the command for speeding up python on a dual processor machine is? python -T? I'm looking for any way to speed this up. I have a text index with 47,000 objects and a search takes about 15-18 seconds, hardly what we were used to. It used to be 2 second tops. That's z2.py -i: -i n Set the interpreter check interval. This integer value determines how often the interpreter checks for periodic things such as thread switches and signal handlers. The Zope default is 120, but you may want to experiment with other values that may increase performance in your particular environment. Increase or decrease the number n and play with ab or some other load testing tool -- Martijn Pieters | Software Engineer mailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ - ___ 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 very unhappy
Whew! I thought something was trashed. Thanks for your prompt replies guys! All my best, Christopher Petrilli writes: Jason, This was accidentally uncommented in the 2.2.4 release, you can ignore it, or comment out the message line in UnIndex.py. It's innocuous. Chris -- | Christopher Petrilli | [EMAIL PROTECTED] - Original Message - From: "Jason Spisak" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 19, 2000 7:39 PM Subject: [Zope-dev] ZCatalog very unhappy Help! Using the Catalog in 2.2.4 2000-12-20T00:59:58 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 51346800 but couldn't. This should not happen. -- 2000-12-20T01:00:00 ERROR(200) UnIndex unindex_object tried to retrieve set None from index but couldn't. This should not happen. -- 2000-12-20T01:00:10 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 942134400 but couldn't. This should not happen. -- 2000-12-20T01:01:48 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 51346800 but couldn't. This should not happen. -- 2000-12-20T01:01:50 ERROR(200) UnIndex unindex_object tried to retrieve set None from index but couldn't. This should not happen. -- 2000-12-20T01:02:21 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 93807 but couldn't. This should not happen. -- 2000-12-20T01:02:37 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 938761200 but couldn't. This should not happen. -- 2000-12-20T01:03:08 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 938588400 but couldn't. This should not happen. -- 2000-12-20T01:04:57 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 937551600 but couldn't. This should not happen. -- 2000-12-20T01:04:57 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 937897200 but couldn't. This should not happen. -- 2000-12-20T01:06:03 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 938415600 but couldn't. This should not happen. -- 2000-12-20T01:06:33 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 938502000 but couldn't. This should not happen. -- 2000-12-20T01:09:19 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 93375 but couldn't. This should not happen. -- 2000-12-20T01:09:22 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 938674800 but couldn't. This should not happen. -- 2000-12-20T01:12:44 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 937465200 but couldn't. This should not happen. Jason Spisak CIO __ ___ ____ / // (_)_/_ __/__ / / ___ ___ __ _ / _ / / __/ -_) / / -_) __/ _ \(_-_/ __/ _ \/ ' \ /_//_/_/_/ \__/_/ \__/\__/_//_/___(_)__/\___/_/_/_/ 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats. ___ 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 ) Jason Spisak CIO __ ___ ____ / // (_)_/_ __/__ / / ___ ___ __ _ / _ / / __/ -_) / / -_) __/ _ \(_-_/ __/ _ \/ ' \ /_//_/_/_/ \__/_/ \__/\__/_//_/___(_)__/\___/_/_/_/ 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats. ___ 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] Keyword Indexes causing Keyerrors
On 12/20/00 11:33 AM, "Itamar Shtull-Trauring" [EMAIL PROTECTED] wrote: I'm getting tons and tons of keyerrors when making changes to a catalogaware object's keyword index and then reindex_object() it. Alternatively, the Catalog doesn't get updated at all. Is there any way to prevent this from happening, other than upgrading to 2.3? Are you getting KeyErrors or are you getting log messages complaining about keyts not existing? Chris -- | Christopher Petrilli Digital Creations | [EMAIL PROTECTED]Where Zope comes from ___ 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] Keyword Indexes causing Keyerrors
On 12/20/00 11:52 AM, "Itamar Shtull-Trauring" [EMAIL PROTECTED] wrote: KeyErrors - the logging says: 2000-12-20T16:33:00 ERROR(200) UnKeywordIndex unindex_object could not remove 3 from set This is not the "KeyError" in the sense that it's not propogated up to the top level, but it is a lookup error lower down. I will look into this, but it seems to continue to work correctly, even with the log messages (these are all due to trying to make sure things get unindexed correctly before reindexing). Are you getting incorrect data after reindexing the object? Chris -- | Christopher Petrilli Digital Creations | [EMAIL PROTECTED]Where Zope comes from ___ 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] RE: objectIds accessiblilty and a proposal
Toby Dickenson writes: ... protocol specific access rights ... Please No. Zope security is complex enough without having to worry about different security settings depending on how a method is accessed. (And we should have a lower tolerance for complexity when it applies to security) If a user has permission to access a method then he should be able to access it any way (xmlrpc, ZPublisher, DTML, PythonMethods) I agree with you mostly. But it might be a significant difference, whether you access via HTTP or HTTPS or even a protocol that provides trusted authentication. Furthermore, I would not bring DTML and web access on the same level: There are objects, that should be usable by Anonymous inside DTML but should not be viewable over the web (as they will only confuse). All page components (such as "standard_html_header/footer") fall into this category. Dieter ___ 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] Loginmanager and local roles
"Morten W. Petersen" wrote: [Morten W. Petersen] | Any suggestions? Found the problem. There needs to be a method called user_names in the acl_users folder, which returns all the user ids: [snip solution] Sorry I didn't see your question earlier. Here was what I posted to the list back in September when I was having the same problem. Of course, it took me a whole week to figure out. http://lists.zope.org/pipermail/zope-dev/2000-September/006953.html http://lists.zope.org/pipermail/zope-dev/2000-September/007030.html The second posting includes instructions for fixing PersistentUserSouce.py, which is part of Membership. Cheers, Michael. P.S. If you can help generalize the solution so it works for multiple user sources, I'd be grateful. ___ 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 very unhappy
Chris: You mean the -D in z2.py, right? Jason, That logging is probably slowing things down too... shut it off to see if you can get a performance increase. - Original Message - From: "Jason Spisak" [EMAIL PROTECTED] To: "Christopher Petrilli" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, December 20, 2000 9:27 AM Subject: Re: [Zope-dev] ZCatalog very unhappy Whew! I thought something was trashed. Thanks for your prompt replies guys! All my best, Christopher Petrilli writes: Jason, This was accidentally uncommented in the 2.2.4 release, you can ignore it, or comment out the message line in UnIndex.py. It's innocuous. Chris -- | Christopher Petrilli | [EMAIL PROTECTED] - Original Message - From: "Jason Spisak" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 19, 2000 7:39 PM Subject: [Zope-dev] ZCatalog very unhappy Help! Using the Catalog in 2.2.4 2000-12-20T00:59:58 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 51346800 but couldn't. This should not happen. -- 2000-12-20T01:00:00 ERROR(200) UnIndex unindex_object tried to retrieve set None from index but couldn't. This should not happen. -- 2000-12-20T01:00:10 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 942134400 but couldn't. This should not happen. -- 2000-12-20T01:01:48 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 51346800 but couldn't. This should not happen. -- 2000-12-20T01:01:50 ERROR(200) UnIndex unindex_object tried to retrieve set None from index but couldn't. This should not happen. -- 2000-12-20T01:02:21 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 93807 but couldn't. This should not happen. -- 2000-12-20T01:02:37 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 938761200 but couldn't. This should not happen. -- 2000-12-20T01:03:08 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 938588400 but couldn't. This should not happen. -- 2000-12-20T01:04:57 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 937551600 but couldn't. This should not happen. -- 2000-12-20T01:04:57 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 937897200 but couldn't. This should not happen. -- 2000-12-20T01:06:03 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 938415600 but couldn't. This should not happen. -- 2000-12-20T01:06:33 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 938502000 but couldn't. This should not happen. -- 2000-12-20T01:09:19 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 93375 but couldn't. This should not happen. -- 2000-12-20T01:09:22 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 938674800 but couldn't. This should not happen. -- 2000-12-20T01:12:44 ERROR(200) UnIndex unindex_object tried to retrieve set None from index 937465200 but couldn't. This should not happen. Jason Spisak CIO __ ___ ____ / // (_)_/_ __/__ / / ___ ___ __ _ / _ / / __/ -_) / / -_) __/ _ \(_-_/ __/ _ \/ ' \ /_//_/_/_/ \__/_/ \__/\__/_//_/___(_)__/\___/_/_/_/ 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats. ___ 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] ZPatterns, ZClasses, Specialists: Assigning responsibilities
Phillip J. Eby wrote: This should probably be more like: product.addMeToOrder(): item = OrderLineItems.newLineItemFor(self) item.setQuantity(...) etc. order.addLineItem(item) customizable_product.addMeToOrder(): item = OrderLineItems.newLineItemFor(self) item.setGraphic(...) item.setQuantity(...) etc. order.addLineItem(item) This approach makes things more declarative. The product classes can have properties or interfaces that the OrderLineItems specialist can use to decide what kind of line item would serve them best. You can then change your line item assignment rules without necessarily requiring changes to the product classes. Yeah, it does work much better your way. And, getting OrderLineItems to decide on its own which type of object to add - haven't thought about doing it this way before. Thanks - something new to meditate on. I imagine, then, that the UI for uploading the graphic would be included in product.addMeToOrderForm, using a UI snippet from the OrderLineItemsWithGraphic Specialist. Then I could pass REQUEST on to order.addLineItem and to OrderLineItemsWithGraphic.add, which would then upload the file? I think you're right about this being an OrderLineItem. A couple of fine points, however... First, I don't think there needs to be an "OrderLineItemsWithGraphic" specialist, since there is nothing else that would talk to it. It's fine in this case to have the line item classes (either with graphic or without) handle their own UI snippets. UI delegation is for when an object needs to display UI for some *other* object than itself, since you can always use class extenders and other techniques to reshape the apparent class of an object retrieved from a specialist. The interface which other objects deal with is "OrderLineItem", and they simply expect a portion of the form to be rendered, and it's okay for the class to handle that. I got a bit confused here... the UI snippet for uploading a graphic actually comes from the Graphics Specialist. If I want to let the user upload the graphic as part of the product's addToOrderForm, Product needs to get this snippet - but Products and Graphics don't know about each other in the object model, so Product would have to ask OrderLineItems (not OrderLineItemsWithGraphic - I clearly don't need that) to get the snippet from Graphics for it, because it would violate Demeter if it talked directly to Graphics... Or I could eliminate the problem by uploading the graphic from a form displayed by the order line item after it has been added. Second, you need to define that interface so that the Order can give the line item constraints on how it does that UI, so it can share the screen and REQUEST with other objects/data that the Order needs. One easy way to do this is to use a namespace parameter, that simply gives the line item a name prefix to use on its fields. Alternatively, you can use the "record" approach, like this: INPUT TYPE="TEXT" NAME="lineitem1.desiredSize:record:int" VALUE="4" INPUT TYPE="FILE" NAME="lineitem1.imageFile:record:file" ... The resulting REQUEST object from submitting the form will contain a single object, "lineitem1", with "desiredSize" and "imageFile" attributes, so you'll only have to pass a single parameter back to the line item. I've never tried doing a record with a file in it before, so I don't really know how well that works. I've been solving the REQUEST sharing problem using a prefix on form fields... but I like the "record" idea - it makes it much easier to pass the form data around... I'll try it with a file soon. I imagine it would work fine. Woof... so long. I'd appreciate any comments on this - especially on the question on whether it's better to have a specialized type of OrderLineItem, or to link the standard OrderLineItem to a Product object in case of a standard product, or, in the case of a customizable product, to a new object which stores the graphic and tracks the fabrication of the customized item. Here's the question... how many behaviors are different in the order line item itself? Are you also using fulfillment line items? If the only difference to the order line item is that it references some additional data, then I'd say a single class would be fine. Most of the behavior probably comes in on the fulfillment line item, yes? Again, you can ask your FulfillmentLineItems specialist to create "newLineItemFor(orderLineItem)" and let it decide what kind of implementation to hand back. In this case, it probably will be a different class, while for the order line items, it may or may not buy you anything. I haven't thought of using fulfillment line items... not sure what they are for? An order is considered fulfilled once all items have been shipped, so order line items are responsible for tracking everything that happens until a ShipmentLineItem is created. The order line item for a
[Zope-dev] partial search performance problems...
I just did some tests on the performance of the partial matching features of ZCatalog. They weren't as good as I hoped. A Catalog of 2000 objects, text index on a 10 char string (person's last name), with a partial search that will match only 200 items... it takes 10 seconds. At 1000 matches it takes over a minute. And Zope is inaccessible this entire time. This is after I upgraded to Python-2.0 for the new re module (which helped) and messing with interpreter check interval (which didn't really help). Are there any other tricks to get this to perform better? Aside from switching to a relational database. -- 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 )