Defining and creating a temporary storage for each user
Hi all. My work environment is Zope 2.7.x I would like to create a different temporary storage for each user. Of course, I can't simply write them in the zope.conf. Users should have their own storage, so that they can create/modify objects inside that, without influencing the general, shared database. Is this configuration possible? I've seen I could manipulate entries in the dbtab object, but I'm not sure this is safe after the first startup. Regards Marco
I suggest you use the one temporary storage (temp_folder) and in it create one Folder per user. I've done this myself for a similar scope. Or am I missing something? What's the difference of multiple temp folders over multiple folders inside one temp folder?? With early zope 2.7. releases I also found temp_folder to be rather unreliable. I got weird zodb errors that no one on the mailing list could explain or help me solve. (and by that I don't mean anything negative about the mailing list people but, that it was difficult to phrase the bug report since it was quite sporadic) On 9/1/05, Marco Bizzarri <marco.bizzarri@gmail.com> wrote:
Hi all.
My work environment is Zope 2.7.x
I would like to create a different temporary storage for each user. Of course, I can't simply write them in the zope.conf.
Users should have their own storage, so that they can create/modify objects inside that, without influencing the general, shared database.
Is this configuration possible? I've seen I could manipulate entries in the dbtab object, but I'm not sure this is safe after the first startup.
Regards Marco
_______________________________________________ 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 )
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
Hi Peter. No, it should work good for me also... there still is a point on how to create them for a custom product (I've a product and I would like to create the folder inside the product). Also, I would like to test that against ZopeTestCase environment. Do you have some working code? Regards Marco On 9/2/05, Peter Bengtsson <peterbe@gmail.com> wrote:
I suggest you use the one temporary storage (temp_folder) and in it create one Folder per user. I've done this myself for a similar scope. Or am I missing something? What's the difference of multiple temp folders over multiple folders inside one temp folder??
With early zope 2.7. releases I also found temp_folder to be rather unreliable. I got weird zodb errors that no one on the mailing list could explain or help me solve. (and by that I don't mean anything negative about the mailing list people but, that it was difficult to phrase the bug report since it was quite sporadic)
On 9/1/05, Marco Bizzarri <marco.bizzarri@gmail.com> wrote:
Hi all.
My work environment is Zope 2.7.x
I would like to create a different temporary storage for each user. Of course, I can't simply write them in the zope.conf.
Users should have their own storage, so that they can create/modify objects inside that, without influencing the general, shared database.
Is this configuration possible? I've seen I could manipulate entries in the dbtab object, but I'm not sure this is safe after the first startup.
Regards Marco
_______________________________________________ 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 )
-- Peter Bengtsson, work www.fry-it.com <http://www.fry-it.com> home www.peterbe.com <http://www.peterbe.com> hobby www.issuetrackerproduct.com <http://www.issuetrackerproduct.com>
-- Icube Srl http://www.icube.it/
On 9/1/05, Marco Bizzarri <marco.bizzarri@gmail.com> wrote:
Hi Peter.
No, it should work good for me also... there still is a point on how to create them for a custom product (I've a product and I would like to create the folder inside the product).
Are you going to go for multiple temp folders or not? No, I don't know how to create them programmatically. Surely you can figure it out from the source code.
Also, I would like to test that against ZopeTestCase environment.
Do you have some working code?
None. Sorry.
Regards Marco
On 9/2/05, Peter Bengtsson <peterbe@gmail.com> wrote:
I suggest you use the one temporary storage (temp_folder) and in it create one Folder per user. I've done this myself for a similar scope. Or am I missing something? What's the difference of multiple temp folders over multiple folders inside one temp folder??
With early zope 2.7. releases I also found temp_folder to be rather unreliable. I got weird zodb errors that no one on the mailing list could explain or help me solve. (and by that I don't mean anything negative about the mailing list people but, that it was difficult to phrase the bug report since it was quite sporadic)
On 9/1/05, Marco Bizzarri <marco.bizzarri@gmail.com> wrote:
Hi all.
My work environment is Zope 2.7.x
I would like to create a different temporary storage for each user. Of course, I can't simply write them in the zope.conf.
Users should have their own storage, so that they can create/modify objects inside that, without influencing the general, shared database.
Is this configuration possible? I've seen I could manipulate entries in the dbtab object, but I'm not sure this is safe after the first startup.
Regards Marco
_______________________________________________ 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 )
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
-- Icube Srl http://www.icube.it/
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
On 9/2/05, Peter Bengtsson <peterbe@gmail.com> wrote:
On 9/1/05, Marco Bizzarri <marco.bizzarri@gmail.com> wrote:
Hi Peter.
No, it should work good for me also... there still is a point on how to create them for a custom product (I've a product and I would like to create the folder inside the product).
Are you going to go for multiple temp folders or not? No, I don't know how to create them programmatically. Surely you can figure it out from the source code.
Actually, it doesn't make that much difference to me. While using Zope 2.6.xwe tried this, using a TemporaryFolder.constructTemporaryFolder, but we had mixed results... I will try it again.
Also, I would like to test that against ZopeTestCase environment.
Do you have some working code?
None. Sorry.
Thanks for your input, in any case :) Regards Marco -- Icube Srl http://www.icube.it/
Marco Bizzarri wrote:
Users should have their own storage, so that they can create/modify objects inside that, without influencing the general, shared database.
The ZODB mounting machinery isn't designed for this case and it would take a lot of work on your part to make it do what you need, although it should certainly be possible. What about not influencing the general, shared database (can you tell us more about what that is?) means that you think you need seperate storages? cheers, Chris PS: You shouldn't be using DBTab in this day and age, upgrade your Zope version and use zope.conf... -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
On 9/2/05, Chris Withers <chris@simplistix.co.uk> wrote:
Marco Bizzarri wrote:
Users should have their own storage, so that they can create/modify
objects
inside that, without influencing the general, shared database.
The ZODB mounting machinery isn't designed for this case and it would take a lot of work on your part to make it do what you need, although it should certainly be possible.
Ok, I will not purse this for this moment. What about not influencing the general, shared database (can you tell us
more about what that is?) means that you think you need seperate storages?
I will try to better explain myself on what we are actually doing. The context is PAFlow, which is a "pure" (no CMF/Plone) vertical application for (italian) public administration. Inside this application, we are using an in house developed framework where more or less each page shown to the user is connected to an object (which we call controller) on the ZODB. When one user requests a page, PAFlow creates a controller for it (actually, creates also the page, but this is not important now), storing there all the data meaningful for that page, so that later the page can be built simply by invoking methods from the controller (I hope this is clear, otherwise I will post some code example). Of course, the creation/destruction of all these objects is a major performance problem, because they happen all on the ZODB. Since these are temporary data, we would like to create them in a temporay storage, either one for each user or one for all of them. We could create them in the /temp_folder, but this could provide some non trivial security issue (?), also because you can have more than one PAFlow Site installed in a ZODB. What are the data stored on the ZODB, apart from the controllers? Workflow data for ongoing processes. All the domain data are stored on a RDBMS. I hope I explained myself. Thanx for your inputs :) cheers,
Chris
PS: You shouldn't be using DBTab in this day and age, upgrade your Zope version and use zope.conf...
I did not explain myself: I'm not using dbtab, actually. I was exploring the way in which I could achieve what I would like to do and, exploring the code, I stumbled upon dbtab. We're working on 2.7.x, with zope.conf --
Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
-- Icube Srl http://www.icube.it/
The context is PAFlow, which is a "pure" (no CMF/Plone) vertical application for (italian) public administration.
Inside this application, we are using an in house developed framework where more or less each page shown to the user is connected to an object (which we call controller) on the ZODB.
When one user requests a page, PAFlow creates a controller for it (actually, creates also the page, but this is not important now), storing there all the data meaningful for that page, so that later the page can be built simply by invoking methods from the controller (I hope this is clear, otherwise I will post some code example).
All of this sounds quite cool but smells complicated. I don't see a need for multiple temp_folders. Just stick folders (for each instance) and folders inside them (for each user). Good luck -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
On 9/2/05, Peter Bengtsson <peterbe@gmail.com> wrote:
The context is PAFlow, which is a "pure" (no CMF/Plone) vertical application for (italian) public administration.
Inside this application, we are using an in house developed framework
where
more or less each page shown to the user is connected to an object (which we call controller) on the ZODB.
When one user requests a page, PAFlow creates a controller for it (actually, creates also the page, but this is not important now), storing there all the data meaningful for that page, so that later the page can be built simply by invoking methods from the controller (I hope this is clear, otherwise I will post some code example).
All of this sounds quite cool but smells complicated.
Indeed it is ;) I don't see a need for multiple temp_folders. Just stick folders (for
each instance) and folders inside them (for each user).
Yes, if I only could add a new temp_folder inside my object without configuring it inside zope.conf.. Good luck Thanx :) --
Peter Bengtsson, work www.fry-it.com <http://www.fry-it.com> home www.peterbe.com <http://www.peterbe.com> hobby www.issuetrackerproduct.com <http://www.issuetrackerproduct.com>
-- Icube Srl http://www.icube.it/
Marco Bizzarri wrote:
Since these are temporary data, we would like to create them in a temporay storage, either one for each user or one for all of them.
If they are temporary, then why do they need ot be stored in a storage at all? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
You mean mantaining just in the memory... uhmmm.... I should double check with the fact that the object in memory should mantain some reference to an object on the ZODB... which should be no problem at all. Thanks for your input, I have to think about this possibility. Regards Marco On 9/5/05, Chris Withers <chris@simplistix.co.uk> wrote:
Marco Bizzarri wrote:
Since these are temporary data, we would like to create them in a temporay storage, either one for each user or one for all of them.
If they are temporary, then why do they need ot be stored in a storage at all?
Chris
-- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
-- Icube Srl http://www.icube.it/
Marco Bizzarri wrote:
You mean mantaining just in the memory... uhmmm.... I should double check with the fact that the object in memory should mantain some reference to an object on the ZODB... which should be no problem at all.
Beware, an object stored in the ZODB cannot be used by another connection to the database. That means, by another thread, in the most common case. Except if you're very sure about what you're doing, the only kinds of references to persistent objects you should have in memory are their paths. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com fg@nuxeo.com
Yes, it is this kind of problems thats most probably led us to think to put objects on a temporary folder rather than in memory... Regards Marco On 9/5/05, Florent Guillaume <fg@nuxeo.com> wrote:
Marco Bizzarri wrote:
You mean mantaining just in the memory... uhmmm.... I should double check with the fact that the object in memory should mantain some reference to an object on the ZODB... which should be no problem at all.
Beware, an object stored in the ZODB cannot be used by another connection to the database. That means, by another thread, in the most common case. Except if you're very sure about what you're doing, the only kinds of references to persistent objects you should have in memory are their paths.
Florent
-- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com fg@nuxeo.com
-- Icube Srl http://www.icube.it/
Florent, thanks for your suggestion. Could you point me on more detailed information about this topic (i.e. how object stored in ZODB are actually managed)? Is this more a ZODB mailing list question than Zope? Should I directly point to ZODB documentaiton? Regards Marco On 9/5/05, Florent Guillaume <fg@nuxeo.com> wrote:
Marco Bizzarri wrote:
You mean mantaining just in the memory... uhmmm.... I should double check with the fact that the object in memory should mantain some reference to an object on the ZODB... which should be no problem at all.
Beware, an object stored in the ZODB cannot be used by another connection to the database. That means, by another thread, in the most common case. Except if you're very sure about what you're doing, the only kinds of references to persistent objects you should have in memory are their paths.
Florent
-- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com fg@nuxeo.com
-- Icube Srl http://www.icube.it/
Marco Bizzarri wrote:
Florent, thanks for your suggestion.
Could you point me on more detailed information about this topic (i.e. how object stored in ZODB are actually managed)?
I don't know of any document explaining that.
Is this more a ZODB mailing list question than Zope? Should I directly point to ZODB documentaiton?
It's definitely for the ZODB mailing-list, yes. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com fg@nuxeo.com
Marco Bizzarri wrote:
You mean mantaining just in the memory... uhmmm.... I should double check with the fact that the object in memory should mantain some reference to an object on the ZODB... which should be no problem at all.
Yeah, you'll have to be careful with references. If it were me, I'd just use zodb paths as references from your memory-only objects to your ZODB object and only resolve them when absolutely necessary... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (4)
-
Chris Withers -
Florent Guillaume -
Marco Bizzarri -
Peter Bengtsson