Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Cees de Groot


[EMAIL PROTECTED] said:
> This is true in the ZODB, but can be complicated by acquisition.

Cheap cop-out: I was planning to avoid acquisition in my "business object" 
database (which will be a database separate from the Zope ZODB). Personally, 
I'm not very convinced of the necessity and advantages of acquisition, 
contrasted with the issues that often arise because acquisition picks a 
different thing from what the developer thought it would do. It seems OK for a 
strictly hierarchical collection of web-enabled objects, but I am thinking 
about a business model, where I don't see a lot of advantages in inflicting 
behavior onto objects through a containment hierarchy. But then, I didn't read 
the original paper so please prove me wrong.


-- 
Cees de Groot   http://www.cdegroot.com <[EMAIL PROTECTED]>
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B



___
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: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Casey Duncan

Cees de Groot wrote:
> 
> Joachim Werner <[EMAIL PROTECTED]> said:
> >[...]. E.g. how would
> >you handle objects beloning to more than one container? In SQL this is easy
> >(Just have a table that matches key pairs from the container table and the
> >item table). And I don't know any good way of implementing "many-to-many"
> >relations in object hierarchies. Let alone querying them efficiently.
> >
> Probably I'm daft because it is Friday night, but AFAIK ZODB and most OODB's
> store an object only once, keyed by its object id. The rest is just references
> through that oid, so objects that belong to more than one container can be
> added to all these containers and n:m relations are implemented by having a
> list of objects on both sides.

This is true in the ZODB, but can be complicated by acquisition. If an
object can acquire itself, it can cause issues. Plus it becomes
difficult to know whether objects are clones or just identical
instances, although this can be mitigated by exposing their Python
instance id.

-- 
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`-->

___
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] Experiments with ORMapping

2001-05-11 Thread Cees de Groot

Phillip J. Eby <[EMAIL PROTECTED]> said:
>For example, if I am an ISP, and I want to implement an 
>"active" flag on an "account" object, I would like changing it to 
>automatically go out and add or remove routing entries and password entries 
>on my servers when I update the record through my Zope interface (web, 
>SOAP, or whatever).  Could you make a ZODB "Storage" object that supported 
>this?  Maybe.  But from an architectural standpoint it would be rather 
>messy - akin to writing OO code with giant "switch" statements.
>

class Account(Persistent):
def disable(self):
map(lambda s: s.end(), self.subscriptions)
self.enabled = 0

I don't see a switch statement there. Granted, some jerk could come in
and code "account.enabled = 0" somewhere in his code, but that jerk
would soon be looking for other employment ;-). I do think that this
won't happen very often: instance variables in Python are very implicit,
you have to hunt the class code to find them. Instance methods are very
explicit, and therefore more likely to be found first.

(mostly everything an ISP customer orders is a kind of subscription. A
subscription has a start event, a repeat event, and an end event (or
state, or whatever you want to call it). Example webhosting: start event
is 'create Apache config', repeat event is 'send out yearly invoice'
(probably in the base class), end event is 'archive website and remove
from Apache config').

Funny you came up with this example. I run an ISP and have spent the last
couple of days thinking about just this stuff :-)



___
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: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Cees de Groot

Joachim Werner <[EMAIL PROTECTED]> said:
>[...]. E.g. how would
>you handle objects beloning to more than one container? In SQL this is easy
>(Just have a table that matches key pairs from the container table and the
>item table). And I don't know any good way of implementing "many-to-many"
>relations in object hierarchies. Let alone querying them efficiently.
>
Probably I'm daft because it is Friday night, but AFAIK ZODB and most OODB's
store an object only once, keyed by its object id. The rest is just references
through that oid, so objects that belong to more than one container can be
added to all these containers and n:m relations are implemented by having a
list of objects on both sides. 


___
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] Experiments with ORMapping

2001-05-11 Thread Shane Hathaway

"Phillip J. Eby" wrote:
> 
> At 11:01 AM 5/11/01 -0400, Shane Hathaway wrote:
> >Joachim Werner wrote:
> > >
> > > The current design plans of SmartObjects are mainly based on the assumption
> > > that we will not be able to change Zope itself. This is not a dogma for us,
> > > however. I guess doing OR-mapping in the Zope core would be fine with
> > us ;-)
> >
> >FYI by replacing I don't mean changing anything in the Zope core.  I
> >mean using a different class in place of Connection, which you can do
> >just by creating a custom_zodb.py.
> 
> Hm.  So you're suggesting creation of a Storage class that returns a
> special root object which emulates the standard ZODB root
> PersistentMapping, and contains another object that emulates a folder, with
> a bunch of other foldoids that are actually tables, or something of that
> sort?  And maybe exposes some query methods ala ZCatalog?

No.  The suggestion was to return something that implements the DB
interface but doesn't use Connection.py to do it.

> I'm not quite clear on how exactly you suggest mapping from RDMBS ->
> ZODB.  There's a *significant* (IMHO) impedance mismatch between ZODB's
> arbitrarily identified variably structured single records and SQL's
> content-identified fixed-structure record sets.  This is what application
> frameworks/toolkits (such as your own DBAPI product) are needed for.

If you implement this at the Storage level, yes, there is a major
mismatch.  But at the Connection level it makes a lot of sense. 
Connection basically exposes a pile of pickles as objects; an OR mapping
exposes a complex schema as objects.

I think that understanding will change the rest of your response. :-)

Shane

___
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] Experiments with ORMapping

2001-05-11 Thread Phillip J. Eby

At 11:01 AM 5/11/01 -0400, Shane Hathaway wrote:
>Joachim Werner wrote:
> >
> > The current design plans of SmartObjects are mainly based on the assumption
> > that we will not be able to change Zope itself. This is not a dogma for us,
> > however. I guess doing OR-mapping in the Zope core would be fine with 
> us ;-)
>
>FYI by replacing I don't mean changing anything in the Zope core.  I
>mean using a different class in place of Connection, which you can do
>just by creating a custom_zodb.py.

Hm.  So you're suggesting creation of a Storage class that returns a 
special root object which emulates the standard ZODB root 
PersistentMapping, and contains another object that emulates a folder, with 
a bunch of other foldoids that are actually tables, or something of that 
sort?  And maybe exposes some query methods ala ZCatalog?

I'm not quite clear on how exactly you suggest mapping from RDMBS -> 
ZODB.  There's a *significant* (IMHO) impedance mismatch between ZODB's 
arbitrarily identified variably structured single records and SQL's 
content-identified fixed-structure record sets.  This is what application 
frameworks/toolkits (such as your own DBAPI product) are needed for.


> > But the more important one for us is that we still believe that even with
> > ZCatalog Zope can not really do efficient "croos-tree" queries in all 
> cases.
> > A query like "Give me all users who have bought this and that product and
> > are aged 20 or above" can not be handled by the catalog, I think.
>
>Yes it can. :-)  That's not to say that it has as much flexibility as a
>SQL query, but it can do most of the things people usually do with one
>table at a time.
>
>Here's the goal I envision for OR mapping: to be able to move between
>OODBMS and RDBMS seamlessly.  It makes sense to develop on top of ZODB
>then move to an RDBMS for testing and deployment.

Unfortunately, I think that this requirement can *only* be met through a 
common API or access pattern/framework/what-have-you, be it DBAPI, 
ZPatterns, SmartObjects, or TransWarp.  The ZODB is both "too powerful" (in 
its flexibility) and "too weak" (in lack of any ZODB-level notions of 
record sets, schemas, and indexing) to be useful as a 
cross-database-platform API.  That's not to denigrate any of the value of 
ZODB itself - an explicit goal of both ZP and TW is to leverage ZODB's 
flexibility in combination with other kinds of databases.  (And, recently, 
I have been speculatively eyeing the ZODB for some mortgage-industry 
related projects which involve complex variable data structures, 
distribution requirements ala ZEO, and local data stores on 
intermittently-connected laptops.)



> > SmartObjects is more of a programming framework than just adding OR-Mapping
> > to Zope. So if we can solve the storage and query parts more efficiently by
> > just having Zope itself extended a bit, this would be very cool ...
>
>You see, I think it is not necessary to create a programming framework
>if the goal is OR mapping.  The framework is already defined, and it's
>Python / ZODB.  But SmartObjects seems to have many loosely related
>goals, making it difficult to assist.


I think the goal for SO, and all the other frameworks that have been 
created or are being created, is to *make application development 
easier*.  OR mapping is just a means to that end.  LDAP connectivity, or 
other types of non-ZODB data access are important to many of us, as 
well.  This boils down to abstraction of how "data" attributes are 
represented.  For example, if I am an ISP, and I want to implement an 
"active" flag on an "account" object, I would like changing it to 
automatically go out and add or remove routing entries and password entries 
on my servers when I update the record through my Zope interface (web, 
SOAP, or whatever).  Could you make a ZODB "Storage" object that supported 
this?  Maybe.  But from an architectural standpoint it would be rather 
messy - akin to writing OO code with giant "switch" statements.

The Java (and CORBA, actually) solution to this, is to use a "property" 
pattern, where a property is a non-real thing that actually only has 
setters and getters.  An object's users always go through these accessor 
methods, so the implementation can be anything you like.  (Notice, btw, how 
the solution is once again a framework pattern...)

ZPatterns was an effort to produce a Pythonic emulation of this concept 
that didn't need actual methods.  It unfortunately inherits some of the 
flaws of __getattr__ hooks, such as forced semi-centralization of 
implementations. TransWarp does away with that and instead introduces 
property ("feature") objects which themselves have methods, but are not 
data.  This provides a bit more extensibility than the Java approach, since 
it is conceivable one could add an "observable" interface to a property 
object and thus subscribe to it, for example.

Anyway, all I'm really trying to say is, if you want implementation 
independence, you hav

Re: oodb philosophics ;) was: Re: [Zope-dev] Experiments with

2001-05-11 Thread Cees de Groot


[EMAIL PROTECTED] said:
> The only problem with this is that lambdas are not safe for TTW
> scripting 8^(.

I think that TTW scripting and heavy duty application development are very 
incompatible with each other, so that's not a problem :-)


-- 
Cees de Groot   http://www.cdegroot.com <[EMAIL PROTECTED]>
GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD  1986 F303 937F E098 9E8B



___
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] Question about import code

2001-05-11 Thread Dieter Maurer

Shane Hathaway writes:
 > Fred Wilson Horch wrote:
 > > > Importing multiple objects simultaneously could result in a fair amount
 > > > of confusion...
 > > 
 > > Can you elaborate?  When you import a folder, for example, it imports
 > > the folder and all objects in it.
 > 
 > If there are some objects in the folder that have conflicting names and
 > others that don't, what do you do?
Zope already solves this problem for "paste".
Although, I am not sure that I like this solution,
"import" should behave the same, for consistency.

 > Also, if you're thinking about
 > providing this functionality, what about spanning multiple folders? What
 > if some folders already exist?
Again, it should behave like "paste", for consistency.



Dieter

___
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: oodb philosophics ;) was: Re: [Zope-dev] Experiments with

2001-05-11 Thread Casey Duncan

Cees de Groot wrote:
> 
> David Brown <[EMAIL PROTECTED]> said:
> >But isn't Python a decent query language?  Isn't it nice to be able to have
> >all of the facilities of Python at your disposal when manipulating data,
> >rather than hoping that whatever database you are using doesn't have a
> >brain-damaged implementation of SQL?
> >
> Yup. Our business objects are sitting on top of my homebrew O/R mapping layer,
> and I find myself entering the Python shell to do ad-hoc stuff with them more
> and more often. Especially because stuff that repeats one or two times is
> easily added as a method on the object for later reference...
> 
> One nice idea that should be possible in Pythonland as well: a Smalltalk O/R
> mapping layer called GLORP uses Smalltalk as a query language in a very nice
> way. Queries are given as Smalltalk blocks (say lambdas), and the mapping
> layer interprets the block's parse tree in order to spit out equivalent SQL
> code. Say:
> 
> Employees.get(lambda e: e.name[:3] == 'Foo')
> 
> to get all employees that have a name starting with "Foo".
> 

The only problem with this is that lambdas are not safe for TTW
scripting 8^(.

Although a safe lambda could probably be conceived of course...

-- 
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`-->

___
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: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread David Brown

At 08:38 PM 5/11/2001 +0200, you wrote:

 >E.g. how would
 >you handle objects beloning to more than one container? In SQL this is easy
 >(Just have a table that matches key pairs from the container table and the
 >item table).

I could do the same thing with Python, creating a dictionary that does the 
mapping.  You'd have to maintain the dictionary, sure, but you'd have to 
maintain the table in a relational database as well.

 > And I don't know any good way of implementing "many-to-many"
 >relations in object hierarchies. Let alone querying them efficiently.

Well, then we need a many-to-many mapping object.  The point is that we 
could do this in Python and make the classes available, rather than 
morphing our thought processes into whatever shape the RDBMS wants.

We're just missing some functionality, but it can be written without 
rewriting the database code, because we can just store our objects 
(representing indices or mappings or whatever) directly.

The cool thing about object stores is that you can use the object modeling 
tools to do the job, and come up with specific (and more efficient) 
solutions, rather than mapping a general (and possibly slower) solution 
onto a specific problem.

dave


___
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: oodb philosophics ;) was: Re: [Zope-dev] Experiments with

2001-05-11 Thread Cees de Groot

David Brown <[EMAIL PROTECTED]> said:
>But isn't Python a decent query language?  Isn't it nice to be able to have 
>all of the facilities of Python at your disposal when manipulating data, 
>rather than hoping that whatever database you are using doesn't have a 
>brain-damaged implementation of SQL?
>
Yup. Our business objects are sitting on top of my homebrew O/R mapping layer,
and I find myself entering the Python shell to do ad-hoc stuff with them more
and more often. Especially because stuff that repeats one or two times is
easily added as a method on the object for later reference...

One nice idea that should be possible in Pythonland as well: a Smalltalk O/R
mapping layer called GLORP uses Smalltalk as a query language in a very nice
way. Queries are given as Smalltalk blocks (say lambdas), and the mapping
layer interprets the block's parse tree in order to spit out equivalent SQL
code. Say:

Employees.get(lambda e: e.name[:3] == 'Foo')

to get all employees that have a name starting with "Foo". 


___
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: oodb philosophics ;) was: Re: [Zope-dev] Experiments withORMapping

2001-05-11 Thread Casey Duncan

David Brown wrote:
> 
> At 11:45 AM 5/11/2001 -0600, Casey Duncan wrote:
> 
> >One of the biggest limitations in my mind is the lack of a general query
> >language for the ZODB like what you get with most OODBMS and all RDBMS.
> 
> I used to think this as well.
> 
> But isn't Python a decent query language?  Isn't it nice to be able to have
> all of the facilities of Python at your disposal when manipulating data,
> rather than hoping that whatever database you are using doesn't have a
> brain-damaged implementation of SQL?

No and yes. Python is a great oop language, it has no inherent querying
capabilites though outside of namespace lookups (with acquisition when
in Zope) and dictionaries. You would need to build in all possible
queries as Python methods none of which would be very general. This is
something you need not do with a general query language where you can
make arbitrary queries at will.

> Isn't it nice not to have to convert back and forth between SQL types and
> native types?  Isn't it nice not to have to swap in your SQL mind in the
> middle of your Python program?

I am not arguing necessarily for SQL as a query language for the ZODB.
Although it is an accepted standard, but not a perfect one by any means
especially for OODBs. Its appeal lies mainly in the high level of
community familiarity and the plethora of SQL software to borrow from.
 
> Having a general query language makes it easy for people who know that
> particular general query language to write programs.  It makes it easy to
> access a bunch of different data sources, at least until the monster named
> "implementation differences" rears it's ugly head.
> 
> We've all spent years learning to make our programs interface with
> databases, learning how to jump the mental chasm between our programs and
> they way they want to manipulate data, and the way that the database wants
> to manipulate data.  Isn't it nice not to have to do that any more?

Yes, I would argue for a tight integration between the query mechanism
and regular Python, something that Catalogs have begun to implement.
However their query language is a very limiting argument list. Perhaps a
more general Python based query language of some kind needs to be
developed. Something like an expression that returns the set of objects
that meet its criteria. Exactly what this would be would need much
community (Python and Zope) discussion. A start to this discussion can
be found here:

http://dev.zope.org/Wikis/DevSite/Proposals/UnionAndIntersectionOperations

> 
> Don't get me wrong, I believe I get your point.  SQL implementations are
> getting more and more compatible.  There are OODBMS query languages
> specified.  There's no really good way of making different programming
> languages and programming environments interoperate without some sort of
> common meeting ground, like a general query language.

A be all query language for all databases (Which would be SQL at this
point, which is not necessarily tailored to OODBs) will always have
compromises and flaws. I look at something like CORBA which is can be
used to tie programs of all different languages together. Unfortunately
the result of reconsiling COBOL, C, Python, Java, Perl, BASIC, etc. to
some common ground is not always very pretty.

I would really be happy just to get Python (and possibly C) to be able
to perform general ZODB queries without resorting to kludges like
spam_usage='range:min:max'. So what I am talking about is not really
general, but mostly Python/ZODB specific.

> 
> And perhaps I'm overdoing the response, perhaps I've gone off in a
> different direction.  I've just been thinking about this quite a bit lately.
> 
> dave

I think this is a very important topic of discussion. Thanks for adding
your thoughts!

-- 
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`-->

___
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] Experiments with ORMapping

2001-05-11 Thread Joachim Werner

> It sounds like you are tackling a lot of things at once.  You might
> consider dividing into separate projects.

Yep, that's what is happening right now. We are still collecting "feature
requests". Then we will sort them out. A lot of the stuff will also be
useful in different contexts than we have planned, so maybe these things
should be in a different project ...

I'm sure about one thing: "SmartObjects" will be the wron name for most of
the things we are tackling ...

> > A query like "Give me all users who have bought this and that product
and
> > are aged 20 or above" can not be handled by the catalog, I think.

> Yes it can. :-)  That's not to say that it has as much flexibility as a
> SQL query, but it can do most of the things people usually do with one
> table at a time.

I am talking about MANY tables (or object relations) ... ;-)
In the example, it's users in many different sub-folders (e.g. branded
portals), products from a product catalog, etc. If you KNOW in advance that
you will need the info, you can easily store the info pairs in the Catalog,
but if you just want to do ad-hoc data mining ...

> The CMF has a solution for this, actually.  The results of a query
> include only the things you're allowed to access.

That's why I said "standard" ;-)

> > SmartObjects is more of a programming framework than just adding
OR-Mapping
> > to Zope. So if we can solve the storage and query parts more efficiently
by
> > just having Zope itself extended a bit, this would be very cool ...

> You see, I think it is not necessary to create a programming framework
> if the goal is OR mapping.  The framework is already defined, and it's
> Python / ZODB.  But SmartObjects seems to have many loosely related
> goals, making it difficult to assist.

But "Python/ZODB" is not a high-level framework. Like Zope is not the CMF.
Nobody would implement GUIs in pure C now. They are using tools for that.
And we don't want to have to implement things like HTML forms, event
handling, etc. over and over again. We want to just configure and "compile".
Of course this will be within the Python/ZODB framework, i.e. all the
additional functionality will be "support classes" or mix-in classes like
the ones Zope already offers (e.g. CatalogAware).


___
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] : XCRON

2001-05-11 Thread Loren Stafford

1. Be sure to use the STUPID_LOG_FILE or run Zope in debug mode. That's the
only way you will know what Xron's Dispatcher is doing.

2. Xron DTML Methods run as "Anonymous User". You may have to give your Xron
DTML Methods proxy roles so that they can execute the functions you want
them to. This is a common problem for Xron DTML Methods that send email.
They have to have permission to "use mailhost services".

3. Beware of the Catalog bug in 2.3.1bx.

4. Search the archives of [EMAIL PROTECTED] for "Xron". You will find helpful
information about issues that other users have already discovered.

-- Loren

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Espen Sorbye Frederiksen
> Sent: Friday, May 11, 2001 06:35
> To: Homan Els
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Zope-dev] : XCRON
>
>
> Hi, I have installed it as well and can neither get it to work. It does
> nearly what it is supposed to by scheduling the scripts to execute, but
> the final execution does never occur. ANy tricks out there are good news
> for me as well,
>
> Espen
>
>  On Fri, 11 May 2001, Homan Els
> wrote:
>
> > Hi,
> >
> > I did install the xron product from Istaffor, but it doesn't work.
> >
> > I am using Zope - .2.3.2, and installed xron. But, when I want to access
> >
> > the zope - server, I get a zero response back.
> >
> > Does anyone no the answer to this problem ?
> >
> > Thanks,
> >
> > Els Homan
> >
> > Ps. Log-file:
> >
> >
> > --
> > 2001-05-11T09:55:30 INFO(0) ZServer HTTP server started at Fri May 11
> > 11:55:30 2001
> > Hostname: localhost
> > Port: 8080
> > --
> > 2001-05-11T09:55:30 INFO(0) ZServer FTP server started at Fri May 11
> > 11:55:30 2001
> > Hostname: speedy
> > Port: 8021
> > --
> > 2001-05-11T09:55:30 INFO(0) ZServer PCGI Server started at Fri May 11
> > 11:55:30 2001
> > Unix socket: /usr/local/Zope-2.3.1-linux2-x86/var/pcgi.soc
> > --
> > 2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
> > Houston, we have forked
> > --
> > 2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
> > Hi, I just forked off a kid: 2548
> > --
> > 2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
> > Houston, we have forked
> > --
> > 2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
> > Houston, we have forked
> > --
> > 2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
> > Hi, I just forked off a kid: 2550
> > --
> > 2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
> > Houston, we have forked
> > --
> > 2001-05-11T10:12:50 INFO(0) Products.Xron.Loggerr Created new Schedule
> >
> > __
> >
> >
> >
> > ___
> > 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 )
>


___
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: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Joachim Werner

> But isn't Python a decent query language?  Isn't it nice to be able to
have
> all of the facilities of Python at your disposal when manipulating data,
> rather than hoping that whatever database you are using doesn't have a
> brain-damaged implementation of SQL?

Most of the time nobody will need SQL. And having a transparent,
transaction-aware and undoable persistent Object store is really a cool
thing. But from time to time you will hit walls. That's when the object
paradigm just does not do the job completely well any more. E.g. how would
you handle objects beloning to more than one container? In SQL this is easy
(Just have a table that matches key pairs from the container table and the
item table). And I don't know any good way of implementing "many-to-many"
relations in object hierarchies. Let alone querying them efficiently.

Joachim


___
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: oodb philosophics ;) was: Re: [Zope-dev] Experiments withORMapping

2001-05-11 Thread Joachim Werner

> As a matter of fact, we did a quick CMF demo that has the content of the
> zope list, zope-dev, and many of the other zope.org lists, and the
> comp.lang.python list for the past few years.  The catalog searches are
> very very fast, i can't recall if the demo was set up with some
> interesting canned CMF topics, but the things works well.

Sounds very promising ...

> The picture isn't altogether rosy - the process of loading the objects was
> arduous.

What exactly were the problems? I mean, uploading and indexing thousands of
documents IS a big deal. I'm sure that any other indexing system will take a
lot of time for this, too.

Joachim


___
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: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread David Brown

At 11:45 AM 5/11/2001 -0600, Casey Duncan wrote:

>One of the biggest limitations in my mind is the lack of a general query
>language for the ZODB like what you get with most OODBMS and all RDBMS.

I used to think this as well.

But isn't Python a decent query language?  Isn't it nice to be able to have 
all of the facilities of Python at your disposal when manipulating data, 
rather than hoping that whatever database you are using doesn't have a 
brain-damaged implementation of SQL?

Isn't it nice not to have to convert back and forth between SQL types and 
native types?  Isn't it nice not to have to swap in your SQL mind in the 
middle of your Python program?

Having a general query language makes it easy for people who know that 
particular general query language to write programs.  It makes it easy to 
access a bunch of different data sources, at least until the monster named 
"implementation differences" rears it's ugly head.

We've all spent years learning to make our programs interface with 
databases, learning how to jump the mental chasm between our programs and 
they way they want to manipulate data, and the way that the database wants 
to manipulate data.  Isn't it nice not to have to do that any more?

Don't get me wrong, I believe I get your point.  SQL implementations are 
getting more and more compatible.  There are OODBMS query languages 
specified.  There's no really good way of making different programming 
languages and programming environments interoperate without some sort of 
common meeting ground, like a general query language.

And perhaps I'm overdoing the response, perhaps I've gone off in a 
different direction.  I've just been thinking about this quite a bit lately.

dave


___
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: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Casey Duncan

Cees de Groot wrote:
> 
> Shane Hathaway <[EMAIL PROTECTED]> said:
> >That's one reason ZODB is so nice.  You can write an application without
> >writing a formal schema.
> >
> One of the reasons I am seriously considering to migrate our production
> database from PostgreSQL to ZODB. I am about to implement our product
> database, and it is just too darn complex to bother maintaining SQL tables for
> it...
> 
> >Actually OracleStorage and bsddbstorage, recently released, are designed
> >to address concerns about performance and reliability, and they do an
> >excellent job at it.  And I consider ZODB as "real" an OODB as anything
> >else.  (In some ways it's the best out there IMHO.)
> >
> I heard that OracleStorage was quite a bit slower? And from what I've seen
> from FileStorage, it's a basic transaction log - what can be more reliable
> than that?
> 
> Are people using ZODB for non-Zope data? I'd be very interested to discuss
> things like emulating extents, patterns for indexing, etcetera...
> 

One of the biggest limitations in my mind is the lack of a general query
language for the ZODB like what you get with most OODBMS and all RDBMS.
ZCatalog is improving, but it is just not quite there yet.

I do feel that the ZODB is quite robust, and with the added option of
berkeley storage along with others, you have several back-end choices.

-- 
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`-->

___
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] New IOBTrees have no 'map' method

2001-05-11 Thread R. David Murray

On Fri, 11 May 2001, Chris Withers wrote:
> > Probably not appreciably... unless it is, of course. ;-)  It depends how
> > many things you're iterating over. 
> 
> Hehe, I'll leave it then, unless someone complains abotu Squishdot being dog
> slow...

If you haven't already read it, you might be interested in this article:

http://www.python.org/doc/essays/list2str.html

--RDM


___
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] Xron

2001-05-11 Thread Loren Stafford

This is a known problem. Search back thru the archives of [EMAIL PROTECTED] for
Xron and you will find some helpful information. I'll also try to find the
relevant email and forward it to you separately.

-- Loren (lstaffor)

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Homan Els
> Sent: Friday, May 11, 2001 06:23
> To: [EMAIL PROTECTED]
> Subject: [Zope-dev] Xron
>
>
> Hi,
>
> I did install the xron product from Istaffor, but it doesn't work.
>
> I am using Zope - .2.3.2, and installed xron. But, when I want to access
> the zope - server, I get a zero response back.
>
> Does anyone no the answer to this problem ?
>
> Thanks,
>
> Els Homan
>
> __
>
>
>
> ___
> 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: Subject: [Zope-dev] change ownership

2001-05-11 Thread Tim McLaughlin

Magnus,

OK, here goes the evil workaround
It seems that getUser does not return an acquisition wrapped object, so make
your external method this to wrap it (thus giving ownerinfo the ability to
determine the user db):

def setOwner(self, username):
#note: this assumes that the closest User database houses 'username'
user = self.acl_users.getUser(username)
self.changeOwnership(user.__of__(self.acl_users))
return 'done.'

--Tim McLaughlin (tmclaugh)

-Original Message-
From: Magnus Heino (Rivermen)
To: 'Tim McLaughlin'; Magnus Heino (Rivermen)
Sent: 5/11/01 1:20 AM
Subject: SV: Subject: [Zope-dev] change ownership


> could you give me a url, name & pw, and let me take a look at 
> the zclass?

Nope, I'm doing this on my laptop behind a firewall.

But, this is how to reproduce it;


This is my external method:

[magnus@daysleeper Extensions]$ cat Owner.py
def setObjectOwner(self, username):
self.changeOwnership(self.acl_users.getUser(username))
return '%s is now the owner of %s' % (username, self.id)
 
def getObjectOwner(self):
return self.getOwner()
[magnus@daysleeper Extensions]$

Goto Control_Panel/Products. Add a product 'FooProduct'. Enter the
FooProduct and create a ZClass with id and metatype 'FooClass'.

Enter the FooClass and add a External Method. Set Id and Function Name
to
'setObjectOwner'. Module name is 'Owner'.

Go to the Root zope folder. It contains a standard acl_users.

Add a FooClass named 'foo'.

Call the external method on the object like this:

http://192.168.237.105:8080/foo/setObjectOwner?username=magnus

magnus is my username that lives in the acl_users.

You get the Attributeerror on aq_inner. 

Any clues? :-P

Thanks.

/Magnus

___
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: oodb philosophics ;) was: Re: [Zope-dev] Experiments withORMapping

2001-05-11 Thread Ken Manheimer

On friday, 11 May, Joachim Warner wrote:

> > The other motivations for an RDBMS are (1) people have existing schemas
> > and want Zope to access the same data as their existing apps, and they
> > want it to be transparent, and (2) tables with millions of entries are
> > easily stored in Zope but the perception is that the catalog isn't as
> > fast as a database index.  No one has done any tests AFAIK.
> 
> Then we should do these tests. E.g. I'd like to see:
> 
> - 20 GB of Word and PDF documents stored in the ZODB and full-text +
> metadata indexed in ZCatalog
> - the complete [EMAIL PROTECTED] mailing list archive in the ZODB
> 
> If Zope can handle those without the help of external tools (RDBMS etc.),
> I'll use it for all our Document Management ...

As a matter of fact, we did a quick CMF demo that has the content of the
zope list, zope-dev, and many of the other zope.org lists, and the
comp.lang.python list for the past few years.  The catalog searches are
very very fast, i can't recall if the demo was set up with some
interesting canned CMF topics, but the things works well.

The picture isn't altogether rosy - the process of loading the objects was
arduous.  On the other hand, the exercise (actually, a subsequent one with
simpler article objects) served as the basis for tuning the cataloging
process, and may have helped it get a lot better.

If i have time next week, i'll see if we have the corpus online somewhere.  
(The lists were complete up to a few months ago.)  Eventually we'd like to
be incrementally stuffing new messages into the database as they arrive.

The catalog has required some substantial work investment, but from my
viewpoint (particularly since i haven't had to work on it!-), it's well
worth it.

> > Actually OracleStorage and bsddbstorage, recently released, are designed
> > to address concerns about performance and reliability, and they do an
> > excellent job at it.  And I consider ZODB as "real" an OODB as anything
> > else.  (In some ways it's the best out there IMHO.)
> 
> Agreed. ZODB has a much longer proven history of success than most other
> OODBs.

It is quite useful!

I have no experience programming with other object databases, and very
little with relational databases, so i have no basis for comparison.  
What i do know, as a python and zope programmer, is that ZODB is
spectacularly useful as a persistent store - as flexible *and* as powerful
as i could want.  The addition of ZEO manages to significantly increase
that usefulness!  The work we/pythonlabs (and andrew kuchling, etc) is
doing to enable use of it as an independent entity can only help improve
it's usefulness for everyone.

Ken Manheimer
[EMAIL PROTECTED]


___
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] Experiments with ORMapping

2001-05-11 Thread Shane Hathaway

Joachim Werner wrote:
> 
> Hi!
> 
> > > Do you know that there already is a project for OR-Mapping in Zope
> (actually
> > > there are two ...)?
> >
> > Yes, and I think the projects need to look into replacing parts of ZODB
> > rather than adding complexity.  ZODB has pieces that can be split apart
> > and replaced as needed, such as caching, persistence, transactions, the
> > "pickle jar", the multi-threaded connection factory, and the storage
> > layer.  I'm hoping we can achieve OR mapping by only replacing the
> > "pickle jar", i.e. Connection.py.
> 
> The current design plans of SmartObjects are mainly based on the assumption
> that we will not be able to change Zope itself. This is not a dogma for us,
> however. I guess doing OR-mapping in the Zope core would be fine with us ;-)

FYI by replacing I don't mean changing anything in the Zope core.  I
mean using a different class in place of Connection, which you can do
just by creating a custom_zodb.py.

> But I am quite sure it will not solve ALL issues SmartObjects is going to
> tackle. One of the things we want to accomplish is "better ZClasses".
> Another thing is queries: You enumerated a couple of reasons why people
> would use SQL instead of ZODB. One is integration of legacy data of course.

It sounds like you are tackling a lot of things at once.  You might
consider dividing into separate projects.

> But the more important one for us is that we still believe that even with
> ZCatalog Zope can not really do efficient "croos-tree" queries in all cases.
> A query like "Give me all users who have bought this and that product and
> are aged 20 or above" can not be handled by the catalog, I think.

Yes it can. :-)  That's not to say that it has as much flexibility as a
SQL query, but it can do most of the things people usually do with one
table at a time.

Here's the goal I envision for OR mapping: to be able to move between
OODBMS and RDBMS seamlessly.  It makes sense to develop on top of ZODB
then move to an RDBMS for testing and deployment.

> Same with
> the appointment things in our groupware project: While it is trivial for SQL
> to return me all appointments all members of my project have on a specific
> day (security is handled by the SmartObjects folders' methods in that case),
> ZODB/ZCatalog would only be able to resolve this question if either all
> appointments are stored in a central folder (what about security then?) or
> everything is cataloged (again, the standard ZCatalog does not handle
> security here, right?)

The CMF has a solution for this, actually.  The results of a query
include only the things you're allowed to access.

> What I need is an object-oriented storage (and I agree that ZODB is one of
> the best of them) that can efficiently be queried "cross-tree". One
> different approach to this topic could be a better ZCatalog (maybe one that
> stores the catalog in relational tables).

Right.  I agree an *alternate* ZCatalog would be useful.

> > > "Ours" is SmartObjects
> > > (http://demo.iuveno-net.de/iuveno/Products/SmartObjects). Also see the
> > > mailing list archive at
> > > http://imail.iuveno-net.de/pipermail/smartobjects/.
> >
> > Kapil gave Jim and I a good introduction to SmartObjects yesterday.  So
> > far, it seems a lot like ZPatterns in that it mandates a new database
> > access API rather than trying to be transparent like ZODB.
> 
> I think whether SmartObjects (in the current design) can be called
> "transparent" depends on the level. On the user level, they will be. You can
> Add them to folders, cut&paste them, upload them via FTP etc. The Zope
> security API is also used. So they are much more transparent than direct
> connections to LDAP, SQL, or to the file system (o.k. for the filesystem
> extFile does this already). Some of the API will definitely be needed: A
> SmartObject will have to be connected to databases like SQL-DAs or
> LDAPAdapter have to. So there has to be a ZMI-Plugin, and there has to be an
> API for that.
> 
> SmartObjects is more of a programming framework than just adding OR-Mapping
> to Zope. So if we can solve the storage and query parts more efficiently by
> just having Zope itself extended a bit, this would be very cool ...

You see, I think it is not necessary to create a programming framework
if the goal is OR mapping.  The framework is already defined, and it's
Python / ZODB.  But SmartObjects seems to have many loosely related
goals, making it difficult to assist.

Shane

___
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] Re: Grrr... Python Scripts

2001-05-11 Thread Chris Withers

Evan Simpson wrote:
> 
> From: "Chris Withers" <[EMAIL PROTECTED]>
> > Could that we added to PythonScripts/standard.py so I don't have to do it
> all
> > the time?
> 
> This is just part of a general security review that needs to happen. 

I thought that happened in 2.2?

> I
> suppose we need a place to collect suggestions about objects that ought to
> be exposed to restricted Python.

Yup :-)

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] Re: Grrr... Python Scripts

2001-05-11 Thread Evan Simpson

From: "Chris Withers" <[EMAIL PROTECTED]>
> Could that we added to PythonScripts/standard.py so I don't have to do it
all
> the time?

This is just part of a general security review that needs to happen.  I
suppose we need a place to collect suggestions about objects that ought to
be exposed to restricted Python.

Cheers,

Evan @ digicool


___
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] Re: Grrr... Python Scripts

2001-05-11 Thread Chris McDonough



Chris Withers wrote:
> Maybe this could be bundled into the RestrictedPython work?

I think it needs to be its own project... the RestrictedPython work is
being done at a much lower level than this.

___
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] New IOBTrees have no 'map' method

2001-05-11 Thread Chris Withers

Chris McDonough wrote:
> 
> Probably not appreciably... unless it is, of course. ;-)  It depends how
> many things you're iterating over. 

self.data can often contain several thousand objects.

> Might even be slower... it'd require
> testing and its probably not worth it.

Hehe, I'll leave it then, unless someone complains abotu Squishdot being dog
slow...

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] : XCRON

2001-05-11 Thread Espen Sorbye Frederiksen

Hi, I have installed it as well and can neither get it to work. It does
nearly what it is supposed to by scheduling the scripts to execute, but
the final execution does never occur. ANy tricks out there are good news
for me as well,

Espen

 On Fri, 11 May 2001, Homan Els
wrote:

> Hi,
>
> I did install the xron product from Istaffor, but it doesn't work.
>
> I am using Zope - .2.3.2, and installed xron. But, when I want to access
>
> the zope - server, I get a zero response back.
>
> Does anyone no the answer to this problem ?
>
> Thanks,
>
> Els Homan
>
> Ps. Log-file:
>
>
> --
> 2001-05-11T09:55:30 INFO(0) ZServer HTTP server started at Fri May 11
> 11:55:30 2001
> Hostname: localhost
> Port: 8080
> --
> 2001-05-11T09:55:30 INFO(0) ZServer FTP server started at Fri May 11
> 11:55:30 2001
> Hostname: speedy
> Port: 8021
> --
> 2001-05-11T09:55:30 INFO(0) ZServer PCGI Server started at Fri May 11
> 11:55:30 2001
> Unix socket: /usr/local/Zope-2.3.1-linux2-x86/var/pcgi.soc
> --
> 2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
> Houston, we have forked
> --
> 2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
> Hi, I just forked off a kid: 2548
> --
> 2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
> Houston, we have forked
> --
> 2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
> Houston, we have forked
> --
> 2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
> Hi, I just forked off a kid: 2550
> --
> 2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
> Houston, we have forked
> --
> 2001-05-11T10:12:50 INFO(0) Products.Xron.Loggerr Created new Schedule
>
> __
>
>
>
> ___
> 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] New IOBTrees have no 'map' method

2001-05-11 Thread Chris McDonough

Chris Withers wrote:
> 
> Chris McDonough wrote:
> >
> > Untested...
> >
> > return map(lambda x, data=self.data, self=self: data[x].__of__(self),
> > ids)
> 
> ah, I see :-)
> 
> Would that be faster than my little function?

Probably not appreciably... unless it is, of course. ;-)  It depends how
many things you're iterating over.  Might even be slower... it'd require
testing and its probably not worth it.

- C

___
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] Re: Grrr... Python Scripts

2001-05-11 Thread Chris Withers

Chris McDonough wrote:
> 
> We actually need to do something to make a whole bunch of default stuff
> importable and usable from within Python Scripts, it's just a matter of
> which modules/classes to add security declarations for.  

Maybe this could be bundled into the RestrictedPython work?

> It's also a
> matter of when, and who.  This needs to go through the fishbowl,
> likely.  Now if only we could manufacture some more time...

There's a feeling I know too well :-S

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] New IOBTrees have no 'map' method

2001-05-11 Thread Chris Withers

Chris McDonough wrote:
> 
> Untested...
> 
> return map(lambda x, data=self.data, self=self: data[x].__of__(self),
> ids)

ah, I see :-)

Would that be faster than my little function?

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] New IOBTrees have no 'map' method

2001-05-11 Thread Chris McDonough

Chris Withers wrote:
> 
> "R. David Murray" wrote:
> >
> > My guess, after searching for the keyword 'map' and finding an
> > interface that calls for the implementation of __getitem__ and says
> > this allows 'for' loops and 'map' iterations, is that you can just
> > drop the call to the .map method and use the IOBtree directly as
> > the argument to the map function.  But in the absence of real
> > knowledge about what the .map method of the old IOBTree does, that
> > is just a guess.
> 
> Well, to give you an idea of what it did, here's the method I had to write
> toreplace the functionality:
> 
> def data_map(self,ids):
> result=[]
> for id in ids:
> result.append(self.data[id].__of__(self))
> return result
> 
> self.data is an IOBTree.
> 
> If this can be replaced wiith a simple return map(...,self.data), please let me
> know :-)
> 

Untested...

return map(lambda x, data=self.data, self=self: data[x].__of__(self),
ids)

___
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] Re: Grrr... Python Scripts

2001-05-11 Thread Chris McDonough

We actually need to do something to make a whole bunch of default stuff
importable and usable from within Python Scripts, it's just a matter of
which modules/classes to add security declarations for.  It's also a
matter of when, and who.  This needs to go through the fishbowl,
likely.  Now if only we could manufacture some more time...

- C

Chris Withers wrote:
> 
> Chris McDonough wrote:
> >
> > Here Chris, I'll try to solve your pain (untested):
> >
> > from AccessControl import ModuleSecurityInfo
> > ModuleSecurityInfo('Products').declarePublic('Catalog')
> > ModuleSecurityInfo('Products.Catalog').declarePublic('CatalogError')
> 
> Could that we added to PythonScripts/standard.py so I don't have to do it all
> the time?
> Is it a patch worthy of the collector? ;-)
> 
> 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 )

___
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] CoreSessionTracking 0.8 strangeness

2001-05-11 Thread Chris McDonough

This is very odd, as cst depends on ZODB locking just like everything
else in Zope, and uses the same transaction facilities and semantics.

Now this may *be* the problem... some other folks have explained a
problem where newly-created session data "disappears" if the
long-running request that created it is aborted... this may make sense,
because the request never gets the chance to finish, and the session
data object never gets committed to the database because the ZODB
transaction is aborted.

It may be the case (especially if you're using frames or  multiple
windows) that simultaneous concurrent initial requests for a session
data object from the same client might cause one of two newly-created
data objects to be lost.

But I can't imagine a case where a session data object exists for a
while (a few minutes), and then a client comes in with the same
sessionid, and a new session data object is created for him, not
*replacing* the old one, but in addition to the old one... the only
possibility for something like this that I can see is on initial
request, or if a particularly long-running method creates a session data
object, and a user comes in directly after it... ah, wait.  I think I
see how this can happen.

1.  User hits /longrunningmethod.

2.  /longrunningmethod creates a session data object as part of its
operation.

3.  /longrunning method requires 1 minute to process completely.

4.  In the meantime, the user (in a separate window or frame) visits
/shortrunningmethod.

5.  /shortrunningmethod creates a session data object as part of its
operation.

6.  /shortrunningmethod completes and the session data object it created
is committed to the ZODB.

7.  User visits /shortrunningmethod2, which modifies the existing
session data object, /shortunningmethod3, which also does this,
etc.

8.  In the meantime, /longrunningmethod finishes and replaces the
session data
object which has stuff in it from the shortrunningmethods with the
one
it created.

I'm not completely 100% sure about this, but at least it's something to
test.  Could this be what's happening to you?

I may have been overzealous when dealing with confict error problems
here... basically, the conflict error detection stuff is disabled for
session data objects, which makes this sort of thing possible and
likely.  Conflict error detection is the ZODB equivalent of
record-locking... and when it's ignored, you can have some of the same
problems that happen in a nontransactional system (like the problem I
outlined above).  Sigh.

- C


Bjorn Stabell wrote:
> 
> Hi,
> 
> We're developing a shopping cart using the CoreSessionTracking product
> v0.8, but we've run into a strange problem; once in a while
> getSessionData() will create a  new session data object (the token value
> remains the same), and us that for a while.  Now we'll end up having two
> different shopping cart objects, with getSessionData() randomly
> returning one of them them.  We're running Zope 2.3.1.  Could it be that
> some threads can't find the shared session data object and creates their
> own?  The only thing changing between each HTTP request is the thread
> serving the request, AFAIK.
> 
> Regards,
> --
> Bjorn Stabell <[EMAIL PROTECTED]>
> 
> ___
> 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: oodb philosophics ;) was: Re: [Zope-dev] Experiments with ORMapping

2001-05-11 Thread Joachim Werner

> The other motivations for an RDBMS are (1) people have existing schemas
> and want Zope to access the same data as their existing apps, and they
> want it to be transparent, and (2) tables with millions of entries are
> easily stored in Zope but the perception is that the catalog isn't as
> fast as a database index.  No one has done any tests AFAIK.

Then we should do these tests. E.g. I'd like to see:

- 20 GB of Word and PDF documents stored in the ZODB and full-text +
metadata indexed in ZCatalog
- the complete [EMAIL PROTECTED] mailing list archive in the ZODB

If Zope can handle those without the help of external tools (RDBMS etc.),
I'll use it for all our Document Management ...

> That's one reason ZODB is so nice.  You can write an application without
> writing a formal schema.

Another thing (from the Slashdot article earlier this week): In Java,
changes to the object structure mean "recompile". In Zope, you can just do
them. with working "refresh" support this will even work without having to
restart the Zope process ...

> > What about using a real oodb for zope? Dont remember any particular
> > product name, but I heard something.
>
> Actually OracleStorage and bsddbstorage, recently released, are designed
> to address concerns about performance and reliability, and they do an
> excellent job at it.  And I consider ZODB as "real" an OODB as anything
> else.  (In some ways it's the best out there IMHO.)

Agreed. ZODB has a much longer proven history of success than most other
OODBs.



___
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] : XCRON

2001-05-11 Thread Homan Els

Hi,

I did install the xron product from Istaffor, but it doesn't work.

I am using Zope - .2.3.2, and installed xron. But, when I want to access

the zope - server, I get a zero response back.

Does anyone no the answer to this problem ?

Thanks,

Els Homan

Ps. Log-file:


--
2001-05-11T09:55:30 INFO(0) ZServer HTTP server started at Fri May 11
11:55:30 2001
Hostname: localhost
Port: 8080
--
2001-05-11T09:55:30 INFO(0) ZServer FTP server started at Fri May 11
11:55:30 2001
Hostname: speedy
Port: 8021
--
2001-05-11T09:55:30 INFO(0) ZServer PCGI Server started at Fri May 11
11:55:30 2001
Unix socket: /usr/local/Zope-2.3.1-linux2-x86/var/pcgi.soc
--
2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
Houston, we have forked
--
2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
Hi, I just forked off a kid: 2548
--
2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
Houston, we have forked
--
2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
Houston, we have forked
--
2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
Hi, I just forked off a kid: 2550
--
2001-05-11T10:12:44 INFO(0) zdaemon zdaemon: Fri May 11 12:12:44 2001:
Houston, we have forked
--
2001-05-11T10:12:50 INFO(0) Products.Xron.Loggerr Created new Schedule

__



___
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] Xron

2001-05-11 Thread Homan Els

Hi,

I did install the xron product from Istaffor, but it doesn't work.

I am using Zope - .2.3.2, and installed xron. But, when I want to access
the zope - server, I get a zero response back.

Does anyone no the answer to this problem ?

Thanks,

Els Homan

__



___
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] Experiments with ORMapping

2001-05-11 Thread Joachim Werner

> > > But storage of binary pickles was never the intention anyway.  I
created
> > > a little interface that would allow you to store different classes in
> > > different PostgreSQL tables.  Before I got to implementing anything,
> >
> > Is this much like the ZPatterns approach?
>
> Which part of ZPatterns are you referring to?  The idea is to
> (generally) put all instances of a class in a certain table.  But the
> implementation details having nothing in common with ZPatterns.

That's the basic approach for SmartObjects, too.

> > Or do we want to make some automatism to get tables created and
destroyed
> > according to ZClasses needs?

SmartObjects would also do that. But not with the existing ZClasses. There
will be something similar that you can use to define the schemas and that
then creates the classes and the tables on the fly.

> I was thinking there would be a default table where everything gets
> stored by default.  A programmer then tells the ORMapping about specific
> classes and how to store them.




___
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] Experiments with ORMapping

2001-05-11 Thread Joachim Werner

> So, if I had a.n.other SQL table containing some attributes, how would you
see
> that mappign to Zope objects?
>
> What meta_type would they be?
>
> Where would they show up?

That's why we need an API and can't just do everything transparently ;-)

We have the conept of "SmartAttributeSheets" (names can change ;-)) that can
be added to any object or class and map to certain SQL or LDAP sources.



___
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] Experiments with ORMapping

2001-05-11 Thread Joachim Werner

Hi!

> > Do you know that there already is a project for OR-Mapping in Zope
(actually
> > there are two ...)?
>
> Yes, and I think the projects need to look into replacing parts of ZODB
> rather than adding complexity.  ZODB has pieces that can be split apart
> and replaced as needed, such as caching, persistence, transactions, the
> "pickle jar", the multi-threaded connection factory, and the storage
> layer.  I'm hoping we can achieve OR mapping by only replacing the
> "pickle jar", i.e. Connection.py.

The current design plans of SmartObjects are mainly based on the assumption
that we will not be able to change Zope itself. This is not a dogma for us,
however. I guess doing OR-mapping in the Zope core would be fine with us ;-)

But I am quite sure it will not solve ALL issues SmartObjects is going to
tackle. One of the things we want to accomplish is "better ZClasses".
Another thing is queries: You enumerated a couple of reasons why people
would use SQL instead of ZODB. One is integration of legacy data of course.
But the more important one for us is that we still believe that even with
ZCatalog Zope can not really do efficient "croos-tree" queries in all cases.
A query like "Give me all users who have bought this and that product and
are aged 20 or above" can not be handled by the catalog, I think. Same with
the appointment things in our groupware project: While it is trivial for SQL
to return me all appointments all members of my project have on a specific
day (security is handled by the SmartObjects folders' methods in that case),
ZODB/ZCatalog would only be able to resolve this question if either all
appointments are stored in a central folder (what about security then?) or
everything is cataloged (again, the standard ZCatalog does not handle
security here, right?)

What I need is an object-oriented storage (and I agree that ZODB is one of
the best of them) that can efficiently be queried "cross-tree". One
different approach to this topic could be a better ZCatalog (maybe one that
stores the catalog in relational tables).

> > "Ours" is SmartObjects
> > (http://demo.iuveno-net.de/iuveno/Products/SmartObjects). Also see the
> > mailing list archive at
> > http://imail.iuveno-net.de/pipermail/smartobjects/.
>
> Kapil gave Jim and I a good introduction to SmartObjects yesterday.  So
> far, it seems a lot like ZPatterns in that it mandates a new database
> access API rather than trying to be transparent like ZODB.

I think whether SmartObjects (in the current design) can be called
"transparent" depends on the level. On the user level, they will be. You can
Add them to folders, cut&paste them, upload them via FTP etc. The Zope
security API is also used. So they are much more transparent than direct
connections to LDAP, SQL, or to the file system (o.k. for the filesystem
extFile does this already). Some of the API will definitely be needed: A
SmartObject will have to be connected to databases like SQL-DAs or
LDAPAdapter have to. So there has to be a ZMI-Plugin, and there has to be an
API for that.

SmartObjects is more of a programming framework than just adding OR-Mapping
to Zope. So if we can solve the storage and query parts more efficiently by
just having Zope itself extended a bit, this would be very cool ...

Cheers,
Joachim



___
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] CoreSessionTracking 0.8 strangeness

2001-05-11 Thread Bjorn Stabell

Hi,

We're developing a shopping cart using the CoreSessionTracking product
v0.8, but we've run into a strange problem; once in a while
getSessionData() will create a  new session data object (the token value
remains the same), and us that for a while.  Now we'll end up having two
different shopping cart objects, with getSessionData() randomly
returning one of them them.  We're running Zope 2.3.1.  Could it be that
some threads can't find the shared session data object and creates their
own?  The only thing changing between each HTTP request is the thread
serving the request, AFAIK.

Regards,
-- 
Bjorn Stabell <[EMAIL PROTECTED]>


___
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] Re: Grrr... Python Scripts

2001-05-11 Thread Chris Withers

Chris McDonough wrote:
> 
> Here Chris, I'll try to solve your pain (untested):
> 
> from AccessControl import ModuleSecurityInfo
> ModuleSecurityInfo('Products').declarePublic('Catalog')
> ModuleSecurityInfo('Products.Catalog').declarePublic('CatalogError')

Could that we added to PythonScripts/standard.py so I don't have to do it all
the time?
Is it a patch worthy of the collector? ;-)

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] New IOBTrees have no 'map' method

2001-05-11 Thread Chris Withers

"R. David Murray" wrote:
> 
> My guess, after searching for the keyword 'map' and finding an
> interface that calls for the implementation of __getitem__ and says
> this allows 'for' loops and 'map' iterations, is that you can just
> drop the call to the .map method and use the IOBtree directly as
> the argument to the map function.  But in the absence of real
> knowledge about what the .map method of the old IOBTree does, that
> is just a guess.

Well, to give you an idea of what it did, here's the method I had to write
toreplace the functionality:

def data_map(self,ids):
result=[]
for id in ids:
result.append(self.data[id].__of__(self))
return result

self.data is an IOBTree.

If this can be replaced wiith a simple return map(...,self.data), please let me
know :-)

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] Experiments with ORMapping

2001-05-11 Thread Chris Withers

Shane Hathaway wrote:
> 
> Kapil gave Jim and I a good introduction to SmartObjects yesterday.  So
> far, it seems a lot like ZPatterns in that it mandates a new database
> access API rather than trying to be transparent like ZODB.
> 
> > The other is TransWarp, which has a slightly different focus, but Phillip
> > Eby is also on our list, so we won't duplicate efforts.
> 
> TransWarp doesn't try to be transparent either AFAICT...

doing this transparently would be unbelievably cool :-)

So, if I had a.n.other SQL table containing some attributes, how would you see
that mappign to Zope objects?

What meta_type would they be?

Where would they show up?

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 )