Re: [Zope-dev] [PATCH] Forking daemon in debug mode, and new start scripts
I understand zdaemon is going away soon, but here's a small patch to Daemon.py to fork if it finds an EVENT_LOG_FILE. Why do you want that? Logging to a file in the background is a useful feature. [snip -- thanks for the scripts] The non-detaching daemon, however, is just plain annoying. On Unix you can always tail the logfile for the same effect. I do not understand this remark. Your patch *prevents* the daemon from detaching. So you find your own patch annoying? --Guido van Rossum (home page: http://www.python.org/~guido/) ___ 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: AdaptableStorage
Shane Hathaway wrote: I'm thinking about real-time updates. When the underlying data changes, you'd like Zope to see the change immediately. If indefinite delays are OK, then AdaptableStorage already does enough: it raises a ConflictError if you try to write changes based on old data. I think it depends on how you're using it, so I guess thsi wants to be configurable. Is that possible? The idea I like the most for relational databases is to ask the RDBMS what the ID of the last transaction was. If Zope missed a transaction, it should flush all caches. This will work if the database is infrequently changed by external applications, or if Zope is accessed infrequently. Indeed. If external applications make a lot of changes, however, and Zope needs good performance at the same time, then both Zope and the external applications need to update a per-object transaction ID. Then, at the beginning of transactions, Zope would invalidate only the recently updated objects. Hmm, perhaps smarter RDBMSs could make it easy to keep transaction IDs updated using triggers. (This solution could also replace both ZEO and ZRS, BTW. ;-) ) This sounds cool, and the best option, when it's possible... On the filesystem, the problem seems much more difficult, since there are no transactions. You'd like the kernel to send Zope a message anytime someone modifies a file in a certain hierarchy, but that would require kernel hacking. How about having a seperate process which just watched the files and notifed Zope when they changed? For that case, I'm thinking that requiring external apps to touch a special file somewhere might be the right thing. At the beginning of each transaction, if Zope sees a change to the file, it flushes its cache. I don't think you can rely on this :-( I'm hoping to present a complete tutorial on AdaptableStorage at PyCon DC 2003. I hope you'll make this availabel for those of us who can't make it... cheers, Chris ___ 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: AdaptableStorage
Chris Withers wrote: Shane Hathaway wrote: I'm thinking about real-time updates. When the underlying data changes, you'd like Zope to see the change immediately. If indefinite delays are OK, then AdaptableStorage already does enough: it raises a ConflictError if you try to write changes based on old data. I think it depends on how you're using it, so I guess thsi wants to be configurable. Is that possible? I think so. How about having a seperate process which just watched the files and notifed Zope when they changed? A definite possibility. It might even just poke an URL to send the notification. I'm hoping to present a complete tutorial on AdaptableStorage at PyCon DC 2003. I hope you'll make this availabel for those of us who can't make it... Yes, I plan to, assuming they accept my proposal. Shane ___ 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] Can't return / publish object of a dictionary?
Yeah, the new property type in Python 2.2 is pretty cool, but out of range for use under Zope at the moment. The ExtensionClass requirement for persistence eliminates using it with new style Python classes. Plus... the Lars, the original poster, said he was a Python newbie and he certainly doesn't need to get lost wandering around in bleeding edge versions. I think Zope 2.7 or 3.0 is supposed to support new style classes and persistence. But not today... -Jeff Leonardo Rochael Almeida wrote: On Sat, 2003-01-18 at 17:44, Seb Bacon wrote: Jeff Rush wrote: I use a form of the following to compute dynamic titles for Zope objects, where the 'title' attribute is the result of a method call. Modifying it slightly for your case... from ComputedAttribute import ComputedAttribute Class B(A): def getMyObjects(self): ... myObjects = ComputedAttribute(lambda self: self.getMyObjects()) In Python 2.2 (which is unfortunately not yet an option unless you are using a bleeding edge Zope) you can also use the new property type: I might be wrong but I believe class properties only work with new-style classes, and I don't know if Zope ExtensionClass-based objects qualify... Cheers, Leo ___ 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 )