Re: [Modeling-users] (LONG) Other OR-bridges?
Status: Abandoned
Brought to you by:
sbigaret
From: Mario R. <ma...@ru...> - 2003-01-26 00:48:13
|
Hi, > First at all, and answering your previous message, the Modeling > Framework is NOT tightly dependent of/linked to Zope ; only the = Modeler > needs Zope. Apologies for my earlier comment w.r.t. Zope -- I had only read your =20 doc, and the prominence of the ZModelization tool made me jump to a wrong =20 conclusion. What about if the doc be re-organized a little to separete "model =20 concepts (ER)" from "your data description language" (xml) and from "how the ddl is =20= used by the framework" and from "existing tools to manipulate the ddl"? I know, =20 there's plenty to do already ;) > The models used by the framework are xml-models, so it is > possible to write them without having access to the ZModeler (just the > way you write csv-models for use by MiddleKit, using your favorite > editor ; that's not *that* straightforward, though). Having to write XML instead of an excel file is not a major issue -- =20 but it is less comfortable (but maybe the ZModel tool is even more =20 comfortable?) > Comparison between the two frameworks is not an easy task because I =20= > do > not have real-world experience with the MiddleKit Framework. = However, > examining the documentation, I can try to highlight some facts: Thanks a lot for the comprehensive comparison. As I have only played =20= with MK, I would not be in any better position to comment on MK itself. (This comparison could be added as an faq?) ... > - Regarding the frameworks' capabilities: > > - the modeling has a built-in query langage which is =20 > automatically > turned to SQL query > http://modeling.sourceforge.net/UserGuide/ec-fetch-object.html > > -- I could not find something like this in MiddleKit (except, =20= > of > course, fetch all data then python-filter the results) Note: > marked as FUTURE in MiddleKit.Run.ObjectStor In MK you can specify clauses, which as i understand are straight SQL clauses, and are passed appended to the generated SELECT statement. However, I do not think MK has the "fetch only when needed" that you mention for Modeling. For large queries, can either of the frameworks do paging? In Modeling you can get the count, but, if the count is big, can you =20 specify to fetch N objects at a time (respecting the original qualifiers, and =20 sort, if any) ? Can you sort? (This is done in the store or in the db (much faster)) > - the modeling provides all ACID properties ; I cant tell for > MiddleKit > (ACID: Atomicity, Consistency, Isolation, and Durability see > e.g. http://www.zope.org/Wikis/ZODB/guide/node12.html for =20 > details) Can't say it does not do it for sure. > - Misc. > > - installation: it seems that MiddleKit can be easily installed = ; > installing the Modeling requires quite a bunch of third-party > packages (see the file DEPENDENCIES), including the WebWare's > Cheetah ;) I must say that this is a problem! I have not yet managed to install =20 Modeling because i could get neither pgdb nor psycopg installed on my OSX =20 machine, as for some reason they will not compile (am following it up on the =20 psycopg list). PyPgSQL is installed however... how difficult is it to add support to =20= another adaptor such as pypgsgl? BTW, the DEPENDENCIES file in 0.8 is a null reference (to another =20 non-existant file). > That's exactly the kind of things I'd like to add to the documentation > online. These are the results of some quick tests I just made so that > you can figure out: > > [Computer: AMD Athlon XP 1.5Ghz, 512 Mo RAM, HDD on IDE] > Tests made with postgresql and python running on the same machine > > On a sample table having 21 attributes (mostly varchars 255 or so) =20= > and > 1423 rows, these are the raw times of fetching all the rows (select = * > from TABLE): > > python2.1 | python2.2 > = -----------------+------------------- > w/ Modeling (using psycopg): ~6.7s / 0.75s | ~5.4s. / ~0.60s > w/ psycopg: (execute+fetchall): ~0.11s/ 0.11s | ~0.11s / ~0.11s > > Note: the first figure corresponds to the first fetch, the =20 > second > one to subsequent ones. Excellent, thanks. Although the difference is big -- always the price to pay with such logical layering. Is the time spent in converting the response tuples to initialized =20 objects? (If so, could also do this conversion "only when needed"?) Or in doing consistency checking? (Could provide an option to switch this off when fetching?) Anyway, optimizations would be for later but it is good to know where and what could be speeded up. > Remember that the modeling returns fully initialized objects (just > like the MiddleKit does) and that psycopg returns raw rows. = However, > the factor is quite a big one and you see a big difference. By the > way you'll notice that when objects are already fetched (even using > different qualifiers), the framework detects it and fetches > significantly faster (nb: any changes previously made to an object > are not discarded). Very nice. > One big conclusion out of this is that is definitely not a good = idea > to use the modeling framework in e.g. a cgi script: initialization > and fetch times would be too expensive. But desktop applications or > web-app. build on any application server (if it provides a = mechanism > for dealing with sessions) do not suffer these init. times, and can > largely benefit from the framework. So you mean you would have an objectstore cached in each user session? (Very memory expensive?) Or a shared application-level object store that all users that fetch would go through? (To modify they will have to refetch into a new store? Or this is where the new feature you link to about nested contexts =20 comes in?) > Last, 2 applications using the modeling have been successfully put in > production for three months. One is a zope-based web app. dedicated to > the supervision of doctors in duty for the french emergency services =20= > and > associated services, the other one is python-gtk-based app. for > bookshops' stock and sales management (size of the currently installed > DB: ~160Mo). More details about these projects will be put online in > the next weeks, hopefully. Good to know. > Important ``detail'': they both use a non-released-yet version > of the framework, v0.9, planned to be released before the > 15/02/03, or sooner if I find time or if you insist! This > release will be made of bug-fixes and enhancements, including > Feature Request 617997 > =20 > [https://sourceforge.net/tracker/=20 > index.php?func=3Ddetail&aid=3D617997&group_id=3D58935&atid=3D489338] I am in no particular hurry. I am trying to evaluate what tools =20 would`be best for a project I may be doing... >> A suggestion, if I may. How about an easily recognizable and short =20= >> name, >> such as PEOF (python EOF) ? > > Well, this is exactly where I feel touchy... I know the name is not a > good one, so I'm opened to any suggestions, but I do not know if it is > ok to call it python-EOF since EOF is a trademark. How about POM? Which could be interpreted as PyObjectManager, with the additional merit of retaining an implicit credit to Apple, as well as to its =20 non-american author... never know, it might one day become Le Big Pomme :-) > -- S=E9bastien. > Best regards, mario |