RE: [Zope] request for advice
Steve Spicklmire has also written the ZCVSMixin product (which I've never actually used) that might let you integration filesystem versioning with Zope more easily as well...
-----Original Message----- From: Patrick Lewis [mailto:pl@teleport.com] Sent: Friday, July 21, 2000 12:50 PM To: 'zope@zope.org' Subject: Re: [Zope] request for advice
On Fri, Jul 21, 2000 at 04:29:01PM +0100, Seb Bacon wrote:
Hello folks,
I'm just beginning to design my first big Zope application. I'm writing to ask zopististitiatatas for some advice, since I'm a bit of a newbie and I want to make sure:
[a] I reuse as much code as possible [b] I make my code as reusable as possible [c] my application is stable and scalable
1. Background to the application
I'm building an extranet product in Zope. Much of it will be centered around a 'VersioningObject'.
An example of such an object might be an image, a Word document. The objects will have a preview view associated with them. For word docs, this will be a html-ised version, for photos it will be a thumbnail. Perhaps in the future each object will also have rudimentary online editing facilities.
The objects will all support versioning. This means each object can be superceded by another object of the same type. The version number will be incremented. Versions will also have Confera forums associated with them, and ACLs.
Now as I see it, I want a VersioningObject to be a Folderish object that can contain a set of Versions, which are just a load of File objects of the same type. The folder has a method which slects its most recent child file object and displays it by calling its preview method. Older versions are read-only and are listed by title only.
2) My questions:
i) I'm worried about the sheer volume of binary data that would accrue in the VersioningObject: a single VersioningObject might be a Word doc of 25Mb. If it has 10 versions and there are 10 such objects, that's 2.5Gb in the ZOBD. I presume this would be a bad idea performance-wise; any suggestions? ii) I'm interested in using ZPatterns because I reckon they sound like they might enhance the reusability etc. of the code; I know there have been some pointers recently, but which ZPatterns could I benefit from? or are they too arcance to worry about for now? iii) Is there any other miscellaneous advice? e.g. has anything like this been done already?
Thanking you all, ladies and gentlemen.
Seb.
A couple of ideas:
- Don't save your data (documents, images) in the ZODB. Instead, save it to disk using the Local File System product. This will prevent the ZODB from getting too big for most OSes.
- I think it would be kind of interesting to use RCS for something like this on the backend. Build your methods in Zope to manipulate RCS, and then you get all the functionality of RCS "for free", and don't have to reinvent the wheel. You may run into problems with people not working with the most current document (I grab something from the database, Jill commits some changes to the same document, I make some changes, commit them, and destroy Jill's changes), but you would have that problem anyway as you initially described it.
Hope this helps.
-- Patrick Lewis <pl@teleport.com>
_______________________________________________ Zope maillist - Zope@zope.org 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 )
Hi Folks, ZCVSMixin is coming along... there are several things that need to be done, but I've been on vacation.. I'm thinking of some kind of fishbowl proposal, but there might be something that could be done easily to allow it to work 'as is' on Windows. (I run windows only when I am forced to ;-> ) Here is the only code in ZCVSMixin that currently makes it fail on Windows:
# # zope doesn't like forking... so let's just be dumb and use files # rather than pipes.. #
stdoutFname = tempfile.mktemp() stderrFname = tempfile.mktemp()
cmd = 'sh -v -c "%s" >%s 2>%s' % (command, stdoutFname, stderrFname)
zLOG.LOG('ZCVSMixin', zLOG.BLATHER, 'processing streams.. "%s"' % cmd)
iresult = os.system(cmd)
zLOG.LOG('ZCVSMixin', zLOG.BLATHER, 'checking result .. "%i"' % iresult)
resultStd = open(stdoutFname).read() resultErr = open(stderrFname).read()
os.remove(stdoutFname) os.remove(stderrFname)
zLOG.LOG('ZCVSMixin', zLOG.BLATHER, 'Got result.. "%s"' % resultStd) zLOG.LOG('ZCVSMixin', zLOG.BLATHER, 'Got err result.. "%s"' % resultErr)
return iresult, resultStd, resultErr
I started with popen2 and friends.. but that didn't seem to play well with Zope... probably mixing processes and threads is a bad idea... I dunno. Anyway I'm not sure of the best way to do this in Windows. Of course, ulitmately Shane Hathaway's idea of having a separate 'mini cvs servelet' process running that zope communicates with via tcp/ip could be the best way to add security and platform independence, but it sounds like a fair amount of extra complexity to me, esp when I don't have a lot of 'free time' to implement such a strategy. Any thoughts about this? Also.. I'm trying to find a sane way to handle folder hierarchies with ZCVSMixin. The main problem I have is separating the attributes of containers with their contents. Right now the export/import code treats folderish objects as a 'clump'. I think need a sort of 'export contents' and 'export attributes' protocol so that folders under CVS control can export their attributes (as if it were some 'content') into some 'special' file, then delegate the exportation of their contents to the CVS Folder. Any thoughts about this appreciated! ;-) -steve
"Chris" == Chris McDonough <chrism@digicool.com> writes:
Chris> Steve Spicklmire has also written the ZCVSMixin product Chris> (which I've never actually used) that might let you Chris> integration filesystem versioning with Zope more easily as Chris> well... >> -----Original Message----- From: Patrick Lewis >> [mailto:pl@teleport.com] Sent: Friday, July 21, 2000 12:50 PM >> To: 'zope@zope.org' Subject: Re: [Zope] request for advice >> >> >> On Fri, Jul 21, 2000 at 04:29:01PM +0100, Seb Bacon wrote: > >> Hello folks, >> > >> > I'm just beginning to design my first big Zope application. >> I'm writing to > ask zopististitiatatas for some advice, since >> I'm a bit of a newbie and I > want to make sure: >> > >> > [a] I reuse as much code as possible > [b] I make my code as >> reusable as possible > [c] my application is stable and >> scalable >> > .....
I started with popen2 and friends.. but that didn't seem to play well with Zope... probably mixing processes and threads is a bad idea... I dunno. Anyway I'm not sure of the best way to do this in Windows. Of course, ulitmately Shane Hathaway's idea of having a separate 'mini cvs servelet' process running that zope communicates with via tcp/ip could be the best way to add security and platform independence, but it sounds like a fair amount of extra complexity to me, esp when I don't have a lot of 'free time' to implement such a strategy.
Any thoughts about this?
Just the redirect idea: WinCVS (www.wincvs.org) uses some method of embedding CVS inside Windows application (IIRC they even separate CVS access methods into some DLL). The application is open source, maybe there is some idea to borrow? Warning: to say the truth, I have never read WinCVS sources. But I used WinCVS ;-) -- www.mk.maxi.pl | People resist change, regardless of what it is. Marcin.Kasperski | (Michael Reed) @softax.com.pl | @bigfoot.com |
participants (3)
-
Chris McDonough -
Marcin Kasperski -
Steve Spicklemire