On Saturday 10 March 2001 18:55, Chuck Esterbrook wrote:
>>At 06:36 AM 3/9/2001 -0800, ender wrote:
>>>i've started working on postgres and oracle backends for middlekit,
>>> postgres being the higher priority of the two for me. i've got to admit
>>> originally having mixed feelings about middlekit. but the more i dig
>>> through the source the more enthusiastic i'm getting that it can support
>>>storage/retrieval/manipulation from a variety of persistence mechanisms
>>> (such as ldap, persistent dom/xml, berkelydb (Cpickles), and rdbms).
>>I'm glad you caught onto that and feel that way. :-)
>>>i'm still trying to piece together exactly how middleKit works from the
>>>source. the docs are geared towards users, so the source still appears to
>>> be the only developer info. there was a lightning talk presented about
>>Right. We don't have docs just for developers of MiddleKit.
would you mind doing a quick architecture document of middlekit, since
middlekit isn't plug and play for anything but mysql, this would be useful.
>>>middlekit @ ipc9, if anyone has slides/outlines for that please put them
>>> up on the webware site/email them to me. i've found wing ide to be
>>> invaluable in
>>Having attended the talk and knowing MiddleKit I can say that the slides
>>are not going to give you any info not found in the docs.
>>>chuck (or anyone who knows MiddleKit), could you outline whats needed to
>>>build a rdbms backend for middlekit, from what i've pieced togther, you
>>> need two modules. please elaborate and correct any errors (i'm sure there
>>> are some).
>>You need to subclass:
>>You made to customize core classes. You do this by defining "mix-ins" in
>>the same file as the generator or store. The mix-in has the same name as
>>the class it hits and gets automatically detected and installed via some
>>magic found in Core.ModelUser (see methods that start with "install" if
>>you're really curious).
>>>1. SQLGenerator (DDL)- this should redefine any of the core attr classes
>>> with db specific type information.
>>MySQL subclasses are pretty slim because I developed MK with MySQL. Later
>>on, I had to refactor some things out.
>>MSSQL subclasses are in "shambles". Dave Rogers, who worked on that, said
>>he will clean it up this week.
>>We will definitely need to refactor some things as we expand our support
>>for other databases. As you already pointed out, some of MySQL's
>>conveniences like connecting to a database via a connection and "if exists"
>>aren't even supported by other databases (which others have touted as more
don't get me started... mysql's features come about as a factor of its having
ignored most concepts of relational dbs in favor of offering a sql frontend
(parser, execution plan, optimizer) to a flat file system (which is also one
of the reasons it was easy to graft on berkely db) without any complications
like traditional rdbms concepts. (just my opinion).
>>Kapil, as the guy who is going after other databases like Postgres, please
>>feel free to propose refactorings.
i'll offer up some thoughts, i'm a bit busy at the moment trying to do some
work on the openacs (bringing the glory of python to them), and the acs, not
to mention my job. but i'll plan on spending a week with webware and
middlekit sometime in the next few weeks.
(for those curious about the openacs stuff check out
its has also come to my attention that sapdb is out with a python interface.
in one fell swoop this just became IMO, the most advanced opensource database.
>>>2. ObjectStore (DQL/DML)- the meat of the db specific implementation/DQL
>>>logic goes here.
>>>in the mySQLObject store implementation there is one method that is
>>> somewhat troublesome to me, namely
>>>def getLastInsertId(), which doesn't appear to me to be particularly
>>>threadsafe or even portable. could you elaborate on its use.
>>MySQL maintains the whole last-insert-id thing according to thread and
>>connection. It's supposed to be safe and so far has been.
>>What's not safe is that SQLObject store reuses the same DB API connection
>>for queries, which in a multi-threaded app could hose you. I will be fixing
there seem to multithreading pitfalls overall the place. i think some thought
should be given to adding utility synchronization functions to the Webware, a
global place for lock storage might allow for reporting via the AdminServlet
on things like lock contention and other useful stats.
>>>all in all i'm pretty impressed by middlekit esp the run time setup. very
>>>I'm going to focus on writing the postgresql storage first (i'm busy so it
>>>will be a few weeks) if someone else wants to write an Oracle one before
>>>then, feel free.
>>Cool. I'm very interested in postgres for various reasons:
>>* It will force the SQL classes to become more mature by rooting out the
>>* My Linux boxes typically have both Postgres and MySQL, so I'm in a good
>>position to test both.
>>* I'm curious to see the performance between the 2. Especially if MK can
>>leverage any Postgres OO features.
i was worried initially when hearing about middlekit and when initially
looking through the code for hidden mysql isms everywhere, but i'm pretty to
happy to state that i don't see too many. of course the real test will be an
actual adaptor to another system.
it could be interesting to use postgres's oo features or it might be
problematic, the only one i'm considering at the moment is table inheritance.
the problem with using this stuff is how vendor dependent it is. every ordbms
seems to do things its own way, with its own caveats (oracle, sapdb,