Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping
Shane Hathaway [EMAIL PROTECTED] said: That's one reason ZODB is so nice. You can write an application without writing a formal schema. One of the reasons I am seriously considering to migrate our production database from PostgreSQL to ZODB. I am about to implement our product database, and it is just too darn complex to bother maintaining SQL tables for it... Actually OracleStorage and bsddbstorage, recently released, are designed to address concerns about performance and reliability, and they do an excellent job at it. And I consider ZODB as real an OODB as anything else. (In some ways it's the best out there IMHO.) I heard that OracleStorage was quite a bit slower? And from what I've seen from FileStorage, it's a basic transaction log - what can be more reliable than that? Are people using ZODB for non-Zope data? I'd be very interested to discuss things like emulating extents, patterns for indexing, etcetera... ___ 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: oodb philosophics ;) was: Re: [Zope-dev] Experiments with
[EMAIL PROTECTED] said: The only problem with this is that lambdas are not safe for TTW scripting 8^(. I think that TTW scripting and heavy duty application development are very incompatible with each other, so that's not a problem :-) -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ 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: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping
Joachim Werner [EMAIL PROTECTED] said: [...]. E.g. how would you handle objects beloning to more than one container? In SQL this is easy (Just have a table that matches key pairs from the container table and the item table). And I don't know any good way of implementing many-to-many relations in object hierarchies. Let alone querying them efficiently. Probably I'm daft because it is Friday night, but AFAIK ZODB and most OODB's store an object only once, keyed by its object id. The rest is just references through that oid, so objects that belong to more than one container can be added to all these containers and n:m relations are implemented by having a list of objects on both sides. ___ 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] Question on __roles__
Chris Withers [EMAIL PROTECTED] said: As this is such a core piece of Zope, it seems quite unlikely to me that I found a bug here (although an older version of ZPublisher does check object instead of subobject). The only thing I can think of is that Acquisition should work for the getattr() and somehow I managed to disable Acquisition on these instances. This sounds like a bug to me. I've had very similar problems to this with Squishdot. An extra data point: it really seems to be a bug. I've applied the patch to our servers (development and production), and the only different behavior I can see is that a folder that is protected by a mysqlUserFolder acl_users now denies be access when trying to access the folder, instead of trying to access one of the objects within the folder. And that seems to be better behavior to me, too. -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Zope Projects in NL/Europe?
Jonathan [EMAIL PROTECTED] said: Just wondering: are there any Zope projects are available in the Netherlands/Benelux/Europe? We did one last year but they seem hard to find. Are there commercial projects available or is Zope mostly used on internal projects? Is there any demand for Zope expertise around here? We are using Zope and could use an extra pair of hands. We're an ISP, and use Zope for our own development work (backoffice stuff, domain management for customers, etcetera). -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Zope eating CPU/RAM - how do I find the culprit?
Jon Prettyman [EMAIL PROTECTED] said: If you are using ZSQLMethods and your database returns column names in one case (UPPER) but you reference them with another (lower) it appears that instances of SQLAlias get leaked. Thanks for the info (and another reason to keep SQL names in lowercase ;-)). -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Zope eating CPU/RAM - how do I find the culprit?
[EMAIL PROTECTED] said: I've made zope inaccessible two different ways: - passing bad data to ZDGChart - sending mail when MailHost is down (i.e. the host it is supposed to connect to is not available) It seems a bug in my virtual hosting code (a Python method that acts as the AccessRule for the root) pushes an empty string on the TraversalRequestNameStack. Could that be the cause? -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Zope eating CPU/RAM - how do I find the culprit?
Jon Prettyman [EMAIL PROTECTED] said: Are you using ZSQLMethods by any chance? Yes, why? (I think I've fixed /this/ problem, but if ZSQLMethods will cause similar behaviour I'd like to be prepared :-)) -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Zope eating CPU/RAM - how do I find the culprit?
Dieter Maurer [EMAIL PROTECTED] said: Cees de Groot writes: ... excessive CPU/memory consumption ... If you use Zope 2.2.x, you can try to access the debug tools in the "Control Panel". They will show you, which request is active (to more easily reproduce and analyse the problem) and how the reference counts are changed. The problem is, apparently the thing gets in a really tight loop - one threads blocks the rest of Zope, so it is quite hard to use these tools (especially not when the whole thing is not - yet - reproducable, sometimes it happens in an hour, sometimes after 12 hours; a bit hard to keep staring at the screen for 12 hours :-)). As a bit of an act of despair, I'm currently logging Zope's CPU usage every 5 seconds in a log file, hopefully I can match a rise in CPU time with some request in the server logs. -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] Question on __roles__
I have encapsulated most bits of my software in a product. One part simply shows database objects, and I've made a base class to handle most of the showing and editing stuff. In the base class, I keep a tab on what methods etc. are used for viewing and for editing, and I use these in the concrete classes to set the roles. Eg: Base.py: class Obj(OFS.SimpleItem.Item, Acquisition.Implicit, AccessControl.Role.RoleManager, AccessControl.Owned.Owned): view_objects = [] index_html = HTMLFile('default_view', globals()) view_object.append('index_html') ... etcetera Customer.py: class Obj(Base.Obj): __ac_permissions__ = ( ('View Own Info', Base.Obj.view_objects), ) ... Globals.default__class_init__(Obj) As far as I can see, this is all by the book. The whole idea is that the set of methods is the same, but the permissions on them can differ (for example, there are special restrictions on viewing and editing invoices). However, these protections don't work in most cases. They seem to work when they pertain to methods, but they don't when they pertain to DTML files. Is there something in the base class' base classes that influences how role lookup works? I've tried to trace down what happens, and found that ZPublisher.BaseRequest has a funny bit: when trying to find out the necessary roles on an object, it first tries to get the attribute '__roles__' on the subobject, and then combines the current entry name plus '__roles__' and tries to get that from the subobject. However, it seems to me that the latter getattr() needs to be done on the object, not the subobject - at least, my tracing seems to indicate that if it walks down, say 'Customer/53/index_html', that at a certain moment during the traversal object = Customer instance subobject = Python method entry_name = 'index_html' Here, looking up "index_html__roles__" in the subobject, the index_html method, doesn't seem to be very useful - it is expected to be found on the containing Customer instance. And indeed, if I change line 386 in BaseRequest.py from: roles = getattr(subobject, entry_name+'__roles__', roles) to: roles = getattr(object, entry_name+'__roles__', roles) things work as I expect them to work. As this is such a core piece of Zope, it seems quite unlikely to me that I found a bug here (although an older version of ZPublisher does check object instead of subobject). The only thing I can think of is that Acquisition should work for the getattr() and somehow I managed to disable Acquisition on these instances. Any hints as to what I'm doing wrong? -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Zope eating CPU/RAM - how do I find the culprit?
[EMAIL PROTECTED] said: Turning on detailed logging at startup might help too... read about the -M argument in the z2.py script and read my Howto regarding "How To Track Down Hangs" at http://www.zope.org/Members/mcdonc/HowTos/ DEBUG-LOG Thanks! That looks promising! -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] Zope eating CPU/RAM - how do I find the culprit?
Our production Zope machine has developed a habit over Christmas where it starts eating CPU and RAM (one Python thread on 100% CPU time, and I've seen kernel messages indicating that Zope was killed because it hit an out-of-memory condition which means it sat on ~500Mb RAM). I'm completely in the dark about what causes this (probably some of my own code, I installed some new bits a couple of days ago), but what's worse: I really don't know how to set about finding the problematic code. Is there a way to find out what code a thread is running? -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] Zope counters @netcraft
In the interest of getting Zope into the picture, I'm registering some 5,700 sites I just brought up at Netcraft. Every little bit helps, they say... -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Another Zope E-Commerce Site Online
[EMAIL PROTECTED] said: [ an awful lot on the workings of his ecommerce site ] Thanks, Brad. A lot of very useful information, and it'll surely help me in building version 2 of our stuff (v1 was a quick 1.5wk hack because of deadlines, I can now take things "easy", like in 1.75wks :-)). -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] ZPatterns
[EMAIL PROTECTED] said: The basic problem as I experience it is not so much the jargon, because you get used to it. That's what they told me about Perl, too. And because I couldn't get used to that mess, I switched to Python (maybe zPatterns was written for the wrong language? ;-}) -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Another Zope E-Commerce Site Online
Brad Clements [EMAIL PROTECTED] said: I haven't looked at Etailer. I did download zCommerce for a look, but was concerned about using ZPatterns. I've used LoginManager and it works well, but the terminology used in ZPatterns always gives me a headache. Clearly a shortcoming on my part - if I could understand what it does I'd probably use it. Nope, it's a shortcoming on the authors' part. At least that's my current opinion, because everytime I've come across a technology I had trouble understanding, it turned out to be a worthless technology or a good one where the authors had trouble explaining their stuff. For the time being, I've placed zPatterns in the latter category ;), and I dearly wish they'd taken more conventional terms. The nice thing about the checkout sequence is that you can move backwards at any time without losing the entered data. Also you can jump out to shop more, jump to the privacy, shipping and returns policy and your entered data isn't lost. As my ebusiness site has trouble with exactly that point, would you care to elaborate on how you accomplished that? It'd be nice to peek at someone else's solution before running off and reinventing wheels :-) -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] ZPatterns
Chris Withers [EMAIL PROTECTED] said: ...I disagree, ZPatterns only major flaw is that its totally immersed in its own jargon which very few people understand :-( That said, my impression is that if you can wade through the b/s, it's more than worth the effort... Hmm, maybe it's the time for a translate-zPatterns-to-english effort? -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Restart...
I said: I'll probably start experimenting with ZEO and IDLE and a way to get unrestricted Python code into ZODB. Smalltalk kicks ass, and Zope is only that far from becoming a superset of it. I did a quick hack that might be interesting to take a look at. I posted it on zope-dev, here's the link: http://lists.zope.org/pipermail/zope-dev/2000-December/008164.html Basically it's a quick hack to let you browse Zope's ZODB from within IDLE. The next steps I'm thinking about is see whether tkhtml works with Tkinter (anyone?) and if yes, open tkhtml windows as a double click action on the DB browser tree (with communication, if possible, through Python and not through HTTP). I'm aware of the (stalled?) Zope-devenv-under- mozilla project. The approach by extending IDLE seems much simpler to me, and I think Zope really needs a decent development environment in order to move from useful to insanely useful - I did a pilot project with Zope last week (http://domein.worldsites.be), and while I am not unhappy with the result as a producer, I am very unhappy with the result as a software engineer. Zope needs an IDE and a decent versioning system (the current CVS project is a good start, but as far as I can see it at the moment too cumbersome to be practical), and until that time I fear I'll have do all my work in Python (maybe with Webware, it seems decent enough and has better support, through its single-shot adapter, for development-time work in Python). -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Why Not Zope? 'Cos I like to bitch! ;-)
Andy McKay [EMAIL PROTECTED] said: The heavy lifting, logic and anything more should be in python. I won't pretend its particularly easy Zope hurt quite a lot some times, but we got there.. I think this is the biggest problem of Zope. Contrary to Python, Zope makes it /hard/ to do things the simple, clean, correct way. The easiest way to add behavior to Zoplications is to add more DTML tags to your web pages; the second-easiest way is Python methods but it's not clear to a lot of people what the calling semantics are; still a bit harder is to write special ZClasses with Python methods that encapsulate your behavior (you can only add ZClasses at one point in the tree, and that's always /not/ the point you are doing all the other work), and the hardest way is to separate stuff out in products (which means, as far as I understood it, hitting lots of "Restart" buttons and certainly means that you loose the multi-versioning capability of ZODB. There are lots of similarities between Zope and Smalltalk. Just gimme a decent class browser! ;-) -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope-dev] Re: [Geeks] Interface Meta Data proposal
Jeffrey P Shell [EMAIL PROTECTED] said: But I'm not sure how one would go about setting your meta-data in a way that is at all natural to Python. I think that exceptions that a method must\should raise *should* be part of a signature\contract. This is one of the really cool things about Java. If you use a method, 'readFile' that says it raises IOError, you *HAVE* to catch that exception (I believe in order to compile). It's so cool, it really chills your productivity. The moment that Python starts doing that, I'll drop the language like a hot iron. 'Nuff about thermodynamics. Making exceptions statically checked is probably the worst misfeature of Java. The idea is nice, in that it forces you to deal with exceptions, but in reality it gets in the way too soon - when you're still exploring, refactoring, stuff like that you should be able to turn the damn things off. I've got five years of full-time Java programming behind me, so I know what I'm talking about. But it looks like what you're really wanting is to use interfaces for documentation purposes, not for contract purposes. Not for interfaces at this level of the language. Useful documentation, especially contracts, can be useful programmatically so stuff like that should at least be setup so that it is possible to move it into the language. A bit like the @pre and @post tags in Javadoc comments - they're always nice to have as documentation, but when you run iContract over them, they are activated and start checking your code's behavior. If you don't say you implement 'Cloneable', an exception gets raised (even if you implement the proper method). Another wart in Java that is nice in theory, but sits in your way in practice. I greatly prefer the Smalltalk "protocols" approach, where implementing an interface is accomplished by implementing the right methods period. The funny thing is, hardly any Smalltalk code ever checks for the interface: the (correct) assumption is that if you hand something over to some other thing that says it wants to iterate over whatever you handed over, you'd better be sure that the thing behaves at least enough like a collection so that it can be iterated over. That's the caller's responsibility (a sort of implicit precondition), and if the caller sends over something else, you get a DoesNotUnderstand exception. Very often I have longed in Java for the possibility of an object to implement a subset of behavior of another object, but that's not possible. For example, if you have a bunch of field labels you stuff in a collection just to be able to do getText()/setText() on them (say for internationalization). Now, I want to add menu labels to that collection, they also have getText()/setText() so they would be good citizens in that collection. Java does not allow that, unless I'm prepared to jump through instanceof/type casting hoops (which is only possible if I'm the one actually calling getText()/setText()). This is similar to how we sniff things today, but we just do things like 'if hasattr(obj, "cb_isCopyable") and obj.cb_isCopyable()):' The usual answer of an OO guru here is that if statements are considered harmful, and that if statements that check object types are considered very harmful. The modern variant is "these are strong refactoring smells". -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ 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: [Geeks] Re: Interface Meta Data proposal
Guido van Rossum [EMAIL PROTECTED] said: When you've fully debugged an application, you turn both off. When you've fully debugged a library module, you create two versions: one with both turned off, for use in fully debugged applications, and one with pre-conditions on and post-conditions off, for use by other code that is still in need of debugging. I've heard that this works very well, and in Python 3000 (when we have optional static typing) I would love to add this to Python. If it's not feature bloat. It works very well in fully debugged applications. In the 99.99% other applications, advice is to leave the assertions on during production time so your app will fail fast when a bug pops up (profiling will point you to the two assertions that needs to be turned off for acceptable performance). Personally, but I'm talking without too much thinking here, I think support for assertions in Python should be based on generic support for metaprogramming - there's more than DBC that could benefit from that (aspect-oriented programming, etcetera). -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ 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] Gadfly
Tim Cook [EMAIL PROTECTED] said: You problems will go away if you move to MySQL, PostGres, Oracle, etc... or stop using RDBMS'es altogether... I agree. Unless there is a compelling reason, such as sharing tables with another application. Why not just use ZODB. Life can't be simplier! g Will life stay simple (robust, performant) after you've dumped a couple of hundredthousand records into ZODB? I find using mySQL a PITA compared to ZODB, but I'm not sure how well it keeps with lots of data... -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] expiring dtml documents
[EMAIL PROTECTED] said: any insight as to how one might code something like that? Document traversal is a simple recursive Python function - with one call to objectValues on a folder you can extract all documents (and iterate over them, check their creation date, remove them if necessary); with a second call to objectValues you get all subfolders and recurse into them. objectValues matches on meta type, which is 'Folder' for a folder, and 'DTML Method' for a DTML method. So you'd get something like: def expire(folder): for i in self.objectItems('DTML Method'): id = i[0]; value = i[1] if value.bobobase_modification_time() """now minus two weeks""": # remove i. Maybe tricky because you're iterating # and removing from a collection. check. folder.manage_delObjects(id) for i in folder.objectValues('Folder'): expire(i) Add this as a Python method (or similar) to the top-level folder where you want to expire, and kicking it off is as simple as a HTTP GET from a cron job (I think there's a job scheduler for Zope as well, should make it even easier). Disclaimer: untested, untested, and I never tried this out. -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Reasons for Apache?? SSL?? (was Running Mailman CGI under Zope ZServer)
Joachim Werner [EMAIL PROTECTED] said: Apache can then also be used to serve static parts of your web site, like large documents or images. Also, Apache can be used to cache Zope requests. I use Squid, not Apache as a reverse web proxy in front of Zope. I did a bit of testing, and you can very well serve your static content from Zope in this setup - I am planning to assign caching control properties to parts of the document structure and make Zope 'kick' Squid for a refresh when cached documents are edited. Initial experiments got me 500 requests per second on cached documents - Zope wasn't touched at all. Regarding your problem: Set up a simple packet filter firewall (most Linux distros have scripts for that, e.g. SuSE has "firewals") and don't allow access to port 8080. Something like % ipchains -A input -S 0/0 -d 0/0 8080 -p tcp -j REJECT should totally block port 8080. If you work from 1.2.3.4, you can do: % ipchains -I input -S 1.2.3.4/32 -d 0/0 8080 -p tcp -j ACCEPT and your machine is the only one that can get to this port. If you want to have this done automagically, create /etc/ipchains.conf: % cat /etc/ipchains.conf EOF -I input -S 1.2.3.4/32 -d 0/0 8080 -p tcp -j ACCEPT -A input -S 0/0 -d 0/0 8080 -p tcp -j REJECT EOF and execute '/sbin/ipchains-restore /etc/ipchains.conf' from /etc/rc.d/boot.local (or similar). Disclaimers: I haven't tested these rules; you should have a kernel that does packet filtering; you're not worth the root password if you let someone else tell you firewalling rules without understanding /exactly/ what they do ;-) -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] expiring dtml documents
wade naveja [EMAIL PROTECTED] said: i maintain a zope server that collects several hundred dtml documents per day. there is a need to have dtml documents removed 2 weeks after they are created. any suggestions on how to go about doing this? I'd make a cron job that kicks off a bit of code inside Zope every night; let the code walk the tree and expire old documents. With ZEO you should be able to do this directly from a Python script. -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Upscaling of performance
Petr van Blokland [EMAIL PROTECTED] said: Hi, does have anyone reference on or information about the upscaling of Zope for *very* large hit performance: 1.000.000 per day or so? I've sketched the following upgrade path for our Zope server which eventually should host multiple ten/hundred thousand websites: - At the moment, I have a single box with Zope and a Squid cache in front of it. "Static" DTML pages are tagged so that Squid will cache their rendition - this increased the throughput by a factor of ~6 on my box. - Move Squid on a separate box. - Move mySQL on a separate box. - Move ZODB on a separate box (ZEO). - Put a Linux Virtual Server director in front of your Squid box, and start adding Squid/Zope boxes (I figure ~3 Squid boxes per Zope box, depends on the amount of interactive content you've got) under the same IP. On my home box (Dual PII/400, 256Mb RAM) I can do 120 hits per second at the moment (with everything - Zope, Squid, mySQL, DNS *and* the testing scripts running 5,000 normal websites and 95,000 "under construction" sites), and I figure that I'll easily scale to twenty times that much on a Linux Virtual Server cluster with all functions on separated boxes (that are optimized for their tasks). -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B Forge your CipherSaber and list it: http://www.xs4all.nl/~cg/ciphersaber/ ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] incorporating generated sub-websites within a Zope site
Fred Yankowski [EMAIL PROTECTED] said: OK, this problem is largely the result of the crappy web-design tool she's using, but I really have no control over that. The subsite manage/author doesn't know HTML and would be completely helpless with Zope's "through the web" editing interface. You could of course convert the structure of the site in DTML documents that include the contents from Structured Text documents. Anyone can learn STX, so she could edit the contents through the Zope interface. Also a possibility, although I'm way out of my league here (I'm not a Windows user): WebDAV under '98. If you can explore the documents with the '98 explorer, you should be able to edit them with any tool, not? (I believe that anyone can learn HTML as well, given someone with reasonable didactic skills and an hour or two of time). -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B Forge your CipherSaber and list it: http://www.xs4all.nl/~cg/ciphersaber/ ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] Forbidding overrides?
Something I remember from my early Zope days that could be solved, but I can't seem to find an answer: say I have a simple site where people can do simple things within their folder. However, I want my banners/logo whatever on their pages, so I've setup index_html to put my own stuff in and include their body_text. How can I prevent smartasses from creating index_html documents in their folder? More generally, is it possible to disallow certain folder methods or properties to be overriden from a point in the tree? -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B Forge your CipherSaber and list it: http://www.xs4all.nl/~cg/ciphersaber/ ___ Zope maillist - [EMAIL PROTECTED] 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 )