Re: [Zope-dev] Product Data Storage

2000-07-03 Thread Monty Taylor

Just my $0.02 worth... 

If you can at all avoid it, I think you should find a way to store it in 
the ZODB. 
Maybe a Configuration product that would allow you to create arbitrary 
configuration information and still be able to access it without making 
filesystem calls. Think about DC's Zope on a CD demo. Not that you really 
need to do that sort of thing, but it's really not going to work if you 
have to write stuff to the filesystem.

Actually, an XML Docment somewhere at root level should give you the kind 
of flexibility you're looking for. Lot's of people are using XML files 
for conf these days (they're all jumping... don't you want to...) 

That being said, I totally agree that if you need to store something in a 
file, put it in Zope/var. I, for one, have my Zope application code on 
partition along with other apps, and the data, like Data.fs on another. I 
typically don't expect the apps partition to grow very much, or very 
often, In fact, only when I install something. So it would be quite 
shocking to have that space filling unexpectedly.

But, as always, the choice is completely up to you.

Monty

 Original Message 

On 6/30/00, 3:27:42 PM, Dan "L." Pierson [EMAIL PROTECTED] wrote 
regarding [Zope-dev] Product Data Storage:


 Andy Dawkins writes:
   I have decided AGAINST searching the ZODB for instances of ZMailIn 
because
   that is just too scary, hideously inefficient and I don't want to go 
there.
   Instead I thought of keeping an up-to-date list of where all the current
   instances where held.  My original idea was to get the ZMailIn product 
to
   write a file in to the /lib/python/Products/ZMailIn directory, which
   shouldn't cause any problems that I can see.

 ... snip ...

   So my question is this:
   What are peoples opinions on storing shared product data?  Where should 
it
   be placed?  Should this ability be added to Zope as a standard?

 Shared data should go in zope/var, or a subdirectory of that.
 Zope/lib should be considered read-only by running products unless
 explicitly changed by the user.  As you have correctly pointed out,
 lots of machines share Zope installations for multiple servers.

 A standard interface for Python code to get a private subdirectory of
 var might well be useful.


 ___
 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 )

___
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] Product Data Storage

2000-06-30 Thread Steve Alexander

Andy Dawkins wrote:
 
 So my question is this:
 What are peoples opinions on storing shared product data?  Where should it
 be placed?  Should this ability be added to Zope as a standard?
 

So, this would be the zope equivalent of the unix "/etc/" directory?

Perhaps you could have "etc (Product Settings)" as a subfolder of
control panel.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

___
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] Product Data Storage

2000-06-30 Thread Josh Zeidner



You should look into using ZCatalog for this purpose.

-josh zeidner



I have an interesting issue which I don't think has been raised.  But
instead of solving the issue myself I thought I would share it with you
guys/gals and see what you think.

I am currently working on a Zope MailIn product, which allows you to send
emails directly in to Zope.
Version 0.1 can be found at:
http://www.zope.org/Members/NIP/ZMailIn

In version 0.2 I plan to have a ZMailIn python product which will handle 
the
Zope side of things and behave a bit like a client.  For example you could
add a ZMailIn product instance in to Zope and configure it to receive all
emails for [EMAIL PROTECTED] and provide a method to execute upon mail
arrival.

This is great and you could have n ZMailIn product instances throughout 
your
Zope site and in any position.

When email arrives I need to find all the ZMailIn instances within the ZODB
and hand the email to the correct one.

I have decided AGAINST searching the ZODB for instances of ZMailIn because
that is just too scary, hideously inefficient and I don't want to go there.
Instead I thought of keeping an up-to-date list of where all the current
instances where held.  My original idea was to get the ZMailIn product to
write a file in to the /lib/python/Products/ZMailIn directory, which
shouldn't cause any problems that I can see.

However, It had occurred to me that with the current growth of Zope it was
going to become more popular that separate Zope instances of the same
product may need to share some data.

So my question is this:
What are peoples opinions on storing shared product data?  Where should it
be placed?  Should this ability be added to Zope as a standard?

Thanks in advance.
-Andy Dawkins
(New Information Paradigms Ltd)


___
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 )



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


___
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] Product Data Storage

2000-06-30 Thread Andy Dawkins

You should look into using ZCatalog for this purpose.

OK - that is a solution that could solve my particular issue, but where
would you put it?  Would you put it in the Product folder, or in some common
place in the ZODB.
How would you create it originally? In the products __init__.py or by some
kind of DTML method.

Also would the ZCatalog be appropriate for storing general information to be
shared between instances, Maybe some global configuration options.

I am looking for a generalised method of storing Class Level Variables.
Maybe properties within the Product folder.

But above all I am looking for a method of doing this that the Zope
community agrees as being efficient and recognises as being _the_ solution
to the problem.  I want to avoid a 'hack' solution if possible.

-Andy Dawkins
(New Information Paradigms Ltd)


___
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 )




[Zope-dev] Product Data Storage

2000-06-30 Thread Dan L. Pierson

Andy Dawkins writes:
  I have decided AGAINST searching the ZODB for instances of ZMailIn because
  that is just too scary, hideously inefficient and I don't want to go there.
  Instead I thought of keeping an up-to-date list of where all the current
  instances where held.  My original idea was to get the ZMailIn product to
  write a file in to the /lib/python/Products/ZMailIn directory, which
  shouldn't cause any problems that I can see.

... snip ...

  So my question is this:
  What are peoples opinions on storing shared product data?  Where should it
  be placed?  Should this ability be added to Zope as a standard?

Shared data should go in zope/var, or a subdirectory of that.
Zope/lib should be considered read-only by running products unless
explicitly changed by the user.  As you have correctly pointed out,
lots of machines share Zope installations for multiple servers.

A standard interface for Python code to get a private subdirectory of
var might well be useful.


___
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] Product Data Storage

2000-06-30 Thread Andy Dawkins

Dan wrote:
Shared data should go in zope/var, or a subdirectory of that.
Zope/lib should be considered read-only by running products unless
explicitly changed by the user.  As you have correctly pointed out,
lots of machines share Zope installations for multiple servers.

A standard interface for Python code to get a private subdirectory of
var might well be useful.

Now we're talking, that sounds reasonable.  Thanks for pointing out the
zope/var vs Zope/lib, point taken.  I'm about to code this bit now so for
version 0.2 I'll put a text file in the zope/var directory.

The private subdirectory idea sounds great, but I think some people may
prefer a ZODB solution due to backup's, accessibility and, dare I say it,
ZEO.

Arrgghh, ZEO I didn't think about it until just then. Are there any ZEO
issue's I need to be aware of?

OK - These are great suggestions and I am taking them all in, honest.

Cheers
-Andy


___
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] Product Data Storage

2000-06-30 Thread Chris Withers

Loren Stafford wrote:
 In that case we decided to put the Schedule in the root folder. There is no
 more global data than the catalog itself, but if there were it could be
 stored in the catalog folder, since catalogs are folderish.

Hmm, this is messy. Could the Catalog not be stored in your case in:
/Control Panel/Products/ZScheduler
and in Andy's case in:
/Control Panel/Products/ZMailIn
?

I like your point about ZCatalog's being folderish though ;-)

 ZScheduler's __init__.py method creates this global data structure if and
 only if it doesn't already exist. Because ZScheduler creates it, it can
 assign the appropriate permissions and methods to manage the global
 structure any way it wants.

This sounds like what you want to do, Andy...

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] Product Data Storage

2000-06-30 Thread Loren Stafford

I haven't thought much about this; I just followed mj's original design.
Maybe there was some reason for this decision. Any comment Martijn?

-- Loren


 Loren Stafford wrote:
  In that case we decided to put the Schedule in the root folder.
 There is no
  more global data than the catalog itself, but if there were it could be
  stored in the catalog folder, since catalogs are folderish.

 Hmm, this is messy. Could the Catalog not be stored in your case in:
 /Control Panel/Products/ZScheduler
 and in Andy's case in:
 /Control Panel/Products/ZMailIn
 ?


___
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 )