[Zope3-Users] LocafFS in zope3?
Hi all, Is there a ztk/zope3 egg that presents a directory view, and allows file upload and listing. Seems like a pretty common need, and I wanted to find out before trying to write my own. -- Roy. ___ Zope3-users mailing list Zope3-users@zope.org https://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] threads, pool size and cache recommendations (quad core)
Folks, I am looking for some configuration advice. I am running a zope3 application that uses the ZODB. I expect a peak load of a 100 concurrent users, and am on a *quad* core Intel Xeon Linux box. Am I better off running 2 or 3 ZEO clients talking to the app-server (I am assuming that the OS will load balance so that all processors are utilized well). Or should I not use ZEO at all, and simply assign a large cache, a large connection pool and lots of threads to a single process. I am sure that this is an issue many of you have had to contend with. I would appreciate some rough idea of what the numbers should be for each of the 2 scenarios I outline. -- Roy. ___ Zope3-users mailing list Zope3-users@zope.org https://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] threads, pool size and cache recommendations (quad core)
Hope this helps make things a bit clearer: Concurrent users: 100 Concurrent requests (worst case): 100 Concurrent writes: 1-2 per request Application: online quiz Data written: small updates (100 bytes, approximately) Thanks... I am just looking for some rough guidelines. On Wed, Dec 16, 2009 at 6:58 PM, Andreas Jung li...@zopyx.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 schrieb Roy Mathew: Folks, I am looking for some configuration advice. I am running a zope3 application that uses the ZODB. I expect a peak load of a 100 concurrent users, and am on a *quad* core Intel Xeon Linux box. Am I better off running 2 or 3 ZEO clients talking to the app-server (I am assuming that the OS will load balance so that all processors are utilized well). Or should I not use ZEO at all, and simply assign a large cache, a large connection pool and lots of threads to a single process. I am sure that this is an issue many of you have had to contend with. I would appreciate some rough idea of what the numbers should be for each of the 2 scenarios I outline. You have to provide much more details like #concurrent users, #concurrent requests, #concurrent writes, reads, the nature of the application, kind of data etc. - -aj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkso4IUACgkQCJIWIbr9KYxrTQCePlLWkkBhL4JmTIQuVWTh/BDO N08AnA9PX/JweJoEwJgwLQhj9DzEaW10 =Nczp -END PGP SIGNATURE- -- Roy. ___ Zope3-users mailing list Zope3-users@zope.org https://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] unregister, delete and pack, still no gc?
Hi Folks, I have either stumbled on a storage leak in the ZODB, or I am missing something in my understanding of registration. Briefly, if I add a folder to the ZODB, make it a site, then unregister it, delete it and pack the ZODB, I see the ZODB increase in size.Each time I run the tests, the ZODB keeps growing (by about 7KB). I restarted the ZODB to see if it would help, but no! Here are my exact steps: 1. add a Folder 2. make a the folder a site. 3. register the folder (unnamed utility of type ISite) 4. remove the registration from the registrations tab. 5. delete the folder. 6. pack the ZODB. I have also attached a selenium test that performs all of this. Site-create-delete-gc open /++skin++Rotterdam/@@contents.html clickAndWait link=Folder type focusid Folder-1 clickAndWait //inp...@value="Apply"] clickAndWait link=Folder-1 clickAndWait link=Make a site clickAndWait link=Folder-1 clickAndWait link=Registration clickAndWait //inp...@value='Register this object'] clickAndWait field.actions.register clickAndWait link=[top] clickAndWait link=Folder-1 clickAndWait link=Manage Site clickAndWait link=Registrations clickAndWait deactivate clickAndWait link=[top] click Folder-1 clickAndWait container_delete_button clickAndWait link=[top] clickAndWait link=Manage Process clickAndWait link=ZODB Control click dbs:list clickAndWait PACK ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] wiki refactoring
Hi all, I have reworked the FAQ by: o splitting the page into smaller bits. o fixing the wording of the question headers o correcting a few typos. Please review the changes at: http://wiki.zope.org/zope3/FAQReworked and let me know if the new pages look reasonable. I have kept the older FAQ around - if I don't hear from anyone in the next couple of days, I'll assume that it's ok to replace the old with the new. Thanks. Roy. Stephan Richter writes: On Monday 10 December 2007, Roy Mathew wrote: Now that the zope3 wiki has grown from an afterthought, to a signifcantly useful body of knowledge, I'd like to make the following proposal: o split the wiki into smaller bits. o rework the introduction slightly. o fix the question headers o start writing small HOWTOs (like the grok mini-HOWTOs). I am happy to help with any and all of the above. What do you think? I think that the people that recently worked on the Wiki did a fine job. I just browsed through it the past two days and the story is nice. There are a few things that I would have done differently, but it is not major., Since you mentioned in a follow-up E-mail that you meant the FAQ, I had a quick look. I have to agree, it is huge. That's great! :-) But that also means we have to provide a new approach for presentation. I agree with all your points. I think the most important part would be to split the FAQ into themed sections, such as UI Development, Organization, Development Process, etc. Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. Zope Stephan Richter___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] wiki refactoring
Hi all, Now that the zope3 wiki has grown from an afterthought, to a signifcantly useful body of knowledge, I'd like to make the following proposal: o split the wiki into smaller bits. o rework the introduction slightly. o fix the question headers o start writing small HOWTOs (like the grok mini-HOWTOs). I am happy to help with any and all of the above. What do you think? -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] wiki refactoring (oops - I meant FAQ)
Sorry - the wiki is fine.. I was referring to the FAQ itself. Roy Mathew writes: Hi all, Now that the zope3 wiki has grown from an afterthought, to a signifcantly useful body of knowledge, I'd like to make the following proposal: o split the wiki into smaller bits. o rework the introduction slightly. o fix the question headers o start writing small HOWTOs (like the grok mini-HOWTOs). I am happy to help with any and all of the above. What do you think? -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] __setitem__ works, __delitem__ fails on custom site
Thanks, David - that did the trick. I changed the decl: class IQSite(IPossibleSite): to: class IQSite(IFolder): and had to remove the IWriteContainer and IReadContainer perm decls to avoid a conflict. I am still not sure why that would make the difference - since QSite extended Folder to begin with, wasn't it also of type IFolder? Roy. David Johnson writes: From my experience I find it better to derive from IFolder for the interface and Folder for the class. I can then set which objects are allowed or not allowed to be added based on the standard preconditions/IContained lines in the interface definitions. I set the schema to the primary interface of my class. On Jan 22, 2007, at 1:06 AM, Roy Mathew wrote: Hi Folks, I am trying to create a custom Site object, using the below declarations; all goes well when addding an object O1 to the QSite, but when trying to delete object O1, I get: ForbiddenAttribute: ('__delitem__', ...QSite object at 0xa61dcd6c) The code: class IQSite(IPossibleSite): custom site class QSite(Folder, site.SiteManagerContainer): implements(IQSite) ... class class=.qtmodule.QSite require permission=zope.View interface=zope.app.container.interfaces.IReadContainer / require permission=zope.ManageContent set_schema=zope.app.container.interfaces.IWriteContainer / require permission=zope.Public interface=.interfaces.IQSite / require permission=zope.ManageContent set_schema=.interfaces.IQSite / /class Since both __setitem__ and __getitem__ belong to the same interface, I am baffled - what gives? -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] __setitem__ works, __delitem__ fails on custom site
Hi Folks, I am trying to create a custom Site object, using the below declarations; all goes well when addding an object O1 to the QSite, but when trying to delete object O1, I get: ForbiddenAttribute: ('__delitem__', ...QSite object at 0xa61dcd6c) The code: class IQSite(IPossibleSite): custom site class QSite(Folder, site.SiteManagerContainer): implements(IQSite) ... class class=.qtmodule.QSite require permission=zope.View interface=zope.app.container.interfaces.IReadContainer / require permission=zope.ManageContent set_schema=zope.app.container.interfaces.IWriteContainer / require permission=zope.Public interface=.interfaces.IQSite / require permission=zope.ManageContent set_schema=.interfaces.IQSite / /class Since both __setitem__ and __getitem__ belong to the same interface, I am baffled - what gives? -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] prettier edit widgets..
Hi Folks, I need prettier edit widgets than the stock Rotterdam/Basic skin versions. Is there a collection of such widgets that maybe use dojo/mochikit/scriptaculous. Or is it reasonable to simple re-style (w/css) the stock widgets, or programmatically (in editform) manipulate parameters, to get reasonable edit widgets. -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: prettier edit widgets..
Philipp, Thanks for taking the time to respond - your answer helps me at a couple of levels: a) I know now how to do it. b) It suggests that it is good practice to use the builtin widgets for your own UI. Roy. Philipp von Weitershausen writes: Roy Mathew wrote: I need prettier edit widgets than the stock Rotterdam/Basic skin versions. The skins have little to do with it, except for the CSS styles that apply to pretty much all HTML. Is there a collection of such widgets that maybe use dojo/mochikit/scriptaculous. Or is it reasonable to simple re-style (w/css) the stock widgets, or programmatically (in editform) manipulate parameters, to get reasonable edit widgets. There are several options. First of all, you can style the existing widgets with CSS. If you want to change their behaviour (JavaScript, etc.), then you're probably best of writing your own widgets. Often you can simply subclass the original ones in zope.app.form.browser and override the __call__ method (which returns the widget's HTML). To use your custom widgets in your forms, you have two options: a) explicitly refer to them in form_fields: class MyForm(EditForm): form_fields = Fields(IMySchema) form_fields['afield'].custom_widget = MyCoolWidget b) register them for the fields you use, so they get picked up automatically whenever a TextLine, Int, Choice, etc. field is used in a form (even in Zope 3 itself). See zope.app.form.browser/configure.zcml for exmaples of how the standard Zope 3 widgets are registered. By the way, instead of using IBrowserRequest, you probably may want to specify the interface of your custom layer or skin the 'type' argument to view /. Or you have to use overrides.zcml, otherwise you'll get conflicts (obviously). HTH -- http://worldcookery.com -- Professional Zope documentation and training 2nd edition of Web Component Development with Zope 3 is now shipping! ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: selling zope to a CTO
Philipp von Weitershausen wrote: |Christophe Combelles wrote: | Roy Mathew a écrit : | Hi all, | | Does anyone know of a canned presentation or slides/papers that would | help convince an openminded CTO/CIO that Zope (z3) makes business | sense in a world dominated by huge J2EE and .NET projects. | | | yes :) but I guess everybody knows it | http://oodt.jpl.nasa.gov/better-web-app.mov | |That's about Zope 2/Plone (which still makes it a great presentation, |but I don't think it's what Roy's looking for) Indeed, I like that presentation very much, and it helped convince our technology managers that Zope made sense; however, it is too technically focused - I was hoping for a 15-20 minute sort of thing with some punch, for the higher level execs. -- Thanks, Roy Mathew.___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] recovering from a lost db connection
Brian Sutherland writes: On Wed, Jan 10, 2007 at 08:13:27PM -0500, Roy Mathew wrote: What is the recommended way to recover from a db connection that is held by a Psycopgda adapter instance? If for some reason postgres goes down, I get the following error: File /var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/adapter.py, line 83, in _runWithConnection val = meth(conn, *args) File /usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/dbconnection.p , line 351, in _queryOne self._executeRetry(conn, c, s) File /var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/adapter.py, line 77, in _executeRetry raise DatabaseException(str(exc.args)) DatabaseException: ('no connection to the server\n',). I then have no recourse but to restart the zope server. In the Java world one would put a try/catch around the the SQL operation and attempt a reconnect, but I am wondering if there is a better way (read: automatic recovery) in a z3 world. The way ZPsycopgDA does it is exactly that. But it can be a little complex when you look at the detail. In the Z3 case, I would: * If the error is a concurrent update error, raise a Retry exception. The same request gets tried again. * If the error is an OperationalError, close the connection and re-raise the error (perhaps as a Retry error, though I can think of cases where this is a bad idea). On the next request, the connection is re-opened. Brian, Thanks for your response. I am confused - that means that if this is being done *currently* in Psycopgda, I should simply be able to repeat my client request and succeed in the operation. Or is ZPsycopgda something other than plain old psycopgda? I am essentially stuck once I get this error. The stacktrace above shows that a retry was attempted but did not succeed. Sorry that I am missing your point, but I don't get it! * On other errors, let the error propagate. All this stuff should probably be done at the zope.rdb level. -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] recovering from a lost db connection
What is the recommended way to recover from a db connection that is held by a Psycopgda adapter instance? If for some reason postgres goes down, I get the following error: File /var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/adapter.py, line 83, in _runWithConnection val = meth(conn, *args) File /usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/dbconnection.p , line 351, in _queryOne self._executeRetry(conn, c, s) File /var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/adapter.py, line 77, in _executeRetry raise DatabaseException(str(exc.args)) DatabaseException: ('no connection to the server\n',). I then have no recourse but to restart the zope server. In the Java world one would put a try/catch around the the SQL operation and attempt a reconnect, but I am wondering if there is a better way (read: automatic recovery) in a z3 world. -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] selling zope to a CTO
Hi all, Does anyone know of a canned presentation or slides/papers that would help convince an openminded CTO/CIO that Zope (z3) makes business sense in a world dominated by huge J2EE and .NET projects. -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] reverse field-index lookups
Happy new year everyone! Is there a way to query a FieldIndex in reverse (ie: by object value)? 09:22]Or is there another index that supports reverse lookup? [09:26] I would like to be able to figure out which objects are indexed by a particular value, and since the field index internally stores this info in _rev_index, it seems like a shame to not be able to get to it. -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users