I am looking to map a portion of the local file system into Zope. One way to do this is to use LocalFS, another is to use Ape. I am sure there are onter approaches as well. We are using Zop 2.9.X. Will Ape work in this context? What would you suggest?
On 11 Mar 2006, at 03:13, Dennis Allison wrote:
I am looking to map a portion of the local file system into Zope. One way to do this is to use LocalFS, another is to use Ape. I am sure there are onter approaches as well. We are using Zop 2.9.X. Will Ape work in this context? What would you suggest?
Shane will no longer continue developing Ape and announced this a few weeks ago. See the second article on his home page: http://www.hathawaymix.org/ jens
Dennis Allison wrote:
I am looking to map a portion of the local file system into Zope. One way to do this is to use LocalFS, another is to use Ape. I am sure there are onter approaches as well. We are using Zop 2.9.X. Will Ape work in this context? What would you suggest?
Ape doesn't work with Zope 2.9 yet. Shane
On Saturday 11 March 2006 11:16 am, Shane Hathaway wrote:
Dennis Allison wrote:
I am looking to map a portion of the local file system into Zope. One way to do this is to use LocalFS, another is to use Ape. I am sure there are onter approaches as well. We are using Zop 2.9.X. Will Ape work in this context? What would you suggest?
Ape doesn't work with Zope 2.9 yet.
Shane
We are very interested in this as well. We have a large application using Apelib right now to persist our zope application onto the filesystem so we can use subversion. It's quite elegant for multiple developers, branching, etc. I'd be interested to know if anyone else has had success with other file system persistence and zope. Most seem to save as blobs (at last our last survey of the options did). Apelib is wonderfull because in most cases it saves the contents in text files which can be accessed by external editors which is how we do all our development now. Diffs and merges are easy plus we get history of changes over time. Because APE doesn't work in 2.9, we are kind of stuck as far as upradeing zope and will need to go to localFS or something like it I guess at some point in the future. I would be curious to know where you come out with this Dennis. -Chris
Chris Kratz wrote:
We are very interested in this as well. We have a large application using Apelib right now to persist our zope application onto the filesystem so we can use subversion.
Ouch, DirectoryViews are more likely what you want... ...and maybe GenericSetup for the rest. cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
On Tue, Mar 14, 2006 at 10:29:05PM +0000, Chris Withers wrote:
Chris Kratz wrote:
We are very interested in this as well. We have a large application using Apelib right now to persist our zope application onto the filesystem so we can use subversion.
Ouch, DirectoryViews are more likely what you want...
Sure, they're great. But through the web they are read-only. That's hardly a complete replacement for Ape. Depends on CK's real needs of course. -- Paul Winkler http://www.slinkp.com
Paul Winkler wrote:
On Tue, Mar 14, 2006 at 10:29:05PM +0000, Chris Withers wrote:
Ouch, DirectoryViews are more likely what you want...
Sure, they're great. But through the web they are read-only. That's hardly a complete replacement for Ape. Depends on CK's real needs of course.
Let's have a read shall we:
Chris Kratz wrote:
We are very interested in this as well. We have a large application using Apelib right now to persist our zope application onto the filesystem so we can use subversion.
Now, if using svn for source control is the only reason he was using APE, surely you'd agree that DirecotyViews are a more appropriate method? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Now, if using svn for source control is the only reason he was using APE, surely you'd agree that DirecotyViews are a more appropriate method?
cheers,
Chris
Yes, you are more or less correct. The primary reason we went to APE was after having tried the nightmares of the various zope cvs products which just seemed to be able to tie themselves into knots after awhile. APElib allowed us to persist all objects as plain text files on the file system so that normal file system tools can be used for development. After we went to APE we moved from CVS to subversion. Now most of us develop using a text editor directly modifying our zope objects. We have the refresh interval dialed down to 1s on our dev boxes and 5-10 minutes on the live servers. This allows us to easily shoehorn minor patches (fix - commit - update server) without any service interruption on the live server. So, our reasons for using Apelib were... 1. Allow use of source control (branching, diffs, revision history, etc) on all content types as plain text files, not python pickles. 2. Allow editing of zope objects (DTML, ZPT, ZSQL, py script) externally in appropriate editor. 3. Allow us to quickly push out minor patches to running servers. 4. A distant final item was using TTW editing to do minor tweaks. The only downsides we've found for apelib are that 1, it's slow and it's been end of lifed by it's creator. Two of us have taken stabs at trying to make it so it can run in newer versions of zope, but our deep zope fu isn't up to the challenge (nor do we have a lot of time). And it seems that low level stuff for zodb storage's change with every release (as shane noted in his eol announcement). -Chris -- Chris Kratz
On Thu, Mar 16, 2006 at 11:00:11AM -0500, Chris Kratz wrote:
Now, if using svn for source control is the only reason he was using APE, surely you'd agree that DirecotyViews are a more appropriate method?
cheers,
Chris
Yes, you are more or less correct. The primary reason we went to APE was after having tried the nightmares of the various zope cvs products which just seemed to be able to tie themselves into knots after awhile. APElib allowed us to persist all objects as plain text files on the file system so that normal file system tools can be used for development. After we went to APE we moved from CVS to subversion. Now most of us develop using a text editor directly modifying our zope objects. We have the refresh interval dialed down to 1s on our dev boxes and 5-10 minutes on the live servers. This allows us to easily shoehorn minor patches (fix - commit - update server) without any service interruption on the live server. So, our reasons for using Apelib were...
1. Allow use of source control (branching, diffs, revision history, etc) on all content types as plain text files, not python pickles. 2. Allow editing of zope objects (DTML, ZPT, ZSQL, py script) externally in appropriate editor. 3. Allow us to quickly push out minor patches to running servers. 4. A distant final item was using TTW editing to do minor tweaks.
DirectoryViews would mean you'd lose #4. Otherwise, I think they'd work for you and it's a much simpler solution than ape. Also, if you have any persistent objects for which there isn't an existing FSObject-derived version, you'd have to write one. Another issue is that AFAIK there's no way to control the refresh interval of FSObject subclasses. I guess you could monkeypatch FSObject._updateFromFS. You might want to do that anyway so you don't have to run your production servers in debug mode. -- Paul Winkler http://www.slinkp.com
On Thursday 16 March 2006 12:18 pm, Paul Winkler wrote:
On Thu, Mar 16, 2006 at 11:00:11AM -0500, Chris Kratz wrote:
Now, if using svn for source control is the only reason he was using APE, surely you'd agree that DirecotyViews are a more appropriate method?
cheers,
Chris
Yes, you are more or less correct. The primary reason we went to APE was after having tried the nightmares of the various zope cvs products which just seemed to be able to tie themselves into knots after awhile. APElib allowed us to persist all objects as plain text files on the file system so that normal file system tools can be used for development. After we went to APE we moved from CVS to subversion. Now most of us develop using a text editor directly modifying our zope objects. We have the refresh interval dialed down to 1s on our dev boxes and 5-10 minutes on the live servers. This allows us to easily shoehorn minor patches (fix - commit - update server) without any service interruption on the live server. So, our reasons for using Apelib were...
1. Allow use of source control (branching, diffs, revision history, etc) on all content types as plain text files, not python pickles. 2. Allow editing of zope objects (DTML, ZPT, ZSQL, py script) externally in appropriate editor. 3. Allow us to quickly push out minor patches to running servers. 4. A distant final item was using TTW editing to do minor tweaks.
DirectoryViews would mean you'd lose #4. Otherwise, I think they'd work for you and it's a much simpler solution than ape.
Also, if you have any persistent objects for which there isn't an existing FSObject-derived version, you'd have to write one.
Another issue is that AFAIK there's no way to control the refresh interval of FSObject subclasses. I guess you could monkeypatch FSObject._updateFromFS. You might want to do that anyway so you don't have to run your production servers in debug mode.
Hello Paul, How does the refresh interval work for DirectoryView? Obviously it is not adjustable, so does it only read when it needs to the first time in and after that it hits the cache (until evicted)? I did extensive profiling of Apelib at one point and all the time was getting soaked up with ape checking mod times on thousands of files on the check interval. You don't notice this with a small site, but as the site grows it becomes noticeable. At one point I seriously thought about writing an external process/thread that would periodically sweep the files and check for modified items and then attempt to evict those items from the cache within each zope thread. Or even better, load the object into the cache out of band so it's there the next time the thread runs. I think that would have made apelib much faster and still responsive to changes on the file system. We never got it production ready though. -Chris -- Chris Kratz
On Thu, Mar 16, 2006 at 12:59:04PM -0500, Chris Kratz wrote:
Hello Paul,
How does the refresh interval work for DirectoryView?
If I wrote it in english, it wouldn't be any shorter than the code in CMFCore/FSObject.py :-) See the _updateFromFS() method, you can browse it on svn.zope.org. -- Paul Winkler http://www.slinkp.com
I am perhaps being too lazy here. What is the minimal CMF stuff to install to get the CMFCore/FS... objcts installed? zope-bounces@zope.org wrote on 03/16/2006 03:05:45 PM:
On Thu, Mar 16, 2006 at 12:59:04PM -0500, Chris Kratz wrote:
Hello Paul,
How does the refresh interval work for DirectoryView?
If I wrote it in english, it wouldn't be any shorter than the code in CMFCore/FSObject.py :-) See the _updateFromFS() method, you can browse it on svn.zope.org.
--
Paul Winkler http://www.slinkp.com _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On Thu, Mar 16, 2006 at 05:54:31PM -0500, jpenny@ykksnap-america.com wrote:
I am perhaps being too lazy here. What is the minimal CMF stuff to install to get the CMFCore/FS... objcts installed?
I suspect you can download CMF from zope.org, unzip it, and install only the CMFCore directory. It shouldn't depend on anything else. But I've never done that myself. -PW
zope-bounces@zope.org wrote on 03/16/2006 03:05:45 PM:
On Thu, Mar 16, 2006 at 12:59:04PM -0500, Chris Kratz wrote:
Hello Paul,
How does the refresh interval work for DirectoryView?
If I wrote it in english, it wouldn't be any shorter than the code in CMFCore/FSObject.py :-) See the _updateFromFS() method, you can browse it on svn.zope.org.
--
Paul Winkler http://www.slinkp.com _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Paul Winkler http://www.slinkp.com
Chris Kratz wrote:
How does the refresh interval work for DirectoryView?
When zope is in dev mode, each time an fs-based object is rendered, it checks to see if it has changed on disk. This is pretty quick on linux, but can have issues on windows. In production mode, it is cached from the first time it is rendered until zope is restarted. cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Chris Withers wrote at 2006-3-17 19:54 +0000:
Chris Kratz wrote:
How does the refresh interval work for DirectoryView?
When zope is in dev mode, each time an fs-based object is rendered, it checks to see if it has changed on disk. This is pretty quick on linux, but can have issues on windows.
Until the stupid special handling for Windows is removed... This should have happened ages ago -- but probably is still there... -- Dieter
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dieter Maurer wrote:
Chris Withers wrote at 2006-3-17 19:54 +0000:
Chris Kratz wrote:
How does the refresh interval work for DirectoryView?
When zope is in dev mode, each time an fs-based object is rendered, it checks to see if it has changed on disk. This is pretty quick on linux, but can have issues on windows.
Until the stupid special handling for Windows is removed... This should have happened ages ago -- but probably is still there...
It needs special handling, just *smart* special handling, because Windows filesystems lie about the mtime of their directories. Mark Hammond had a notion of how do make that happen, and I created an issue for it in the CMF collector: http://www.zope.org/Collectors/CMF/366 Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEHgCp+gerLs4ltQ4RAhJnAJ9kaMHIcA1PYNjz8vcnRvrAhEPx1QCgsd2I zzZ7ElIGps59r7uqIfhUwyg= =UVlU -----END PGP SIGNATURE-----
Paul Winkler wrote:
1. Allow use of source control (branching, diffs, revision history, etc) on all content types as plain text files, not python pickles. 2. Allow editing of zope objects (DTML, ZPT, ZSQL, py script) externally in appropriate editor. 3. Allow us to quickly push out minor patches to running servers. 4. A distant final item was using TTW editing to do minor tweaks.
DirectoryViews would mean you'd lose #4.
If you really need to, you have the "customize" button for temporary patches.
Also, if you have any persistent objects for which there isn't an existing FSObject-derived version, you'd have to write one.
GenericSetup likely covers those ;-)
Another issue is that AFAIK there's no way to control the refresh interval of FSObject subclasses. I guess you could monkeypatch FSObject._updateFromFS. You might want to do that anyway so you don't have to run your production servers in debug mode.
I don't think there's any place for debugging or updating from the FS on a running production server, but maybe that's just me... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Dennis Allison wrote:
I am looking to map a portion of the local file system into Zope. One way to do this is to use LocalFS, another is to use Ape.
What's the problem you're trying to solve? I suspect both Ape and LocalFS are the wrong solution ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (9)
-
Chris Kratz -
Chris Withers -
Dennis Allison -
Dieter Maurer -
Jens Vagelpohl -
jpenny@ykksnap-america.com -
Paul Winkler -
Shane Hathaway -
Tres Seaver