[Cosmo-dev] hibernate prototype
rletness at simdeskcorp.com
rletness at simdeskcorp.com
Tue Aug 15 11:45:33 PDT 2006
Brian Moseley wrote:
> On 8/15/06, rletness at simdeskcorp.com <rletness at simdeskcorp.com> wrote:
>
>> I've just about finished a hibernate persistence layer prototype. This
>> layer consists of an object model (based on org.cosmo.model) new dao
>> interfaces, and hibernate implementations of the daos. In addition to a
>> new User and Ticket dao, there is a Content (for general content/files)
>> and Calendar (for calendar objects) dao. These two daos should give you
>> all the methods necessary for supporting webdav and caldav. I have done
>> some initial tests on large datasets and the results are very promising
>> (sub second time-range/property queries). There is still a lot of
>> optimizing to be done, but it is a good start. I have tested using
>> mysql and derby.
>
>
> great news! have you done any work with recurring events or freebusy
> info?
Well, I implemented a calendar query method that takes in a calendar
filter that
represents the caldav:filter element and supports time
ranges/comp/prop/param filters.
This was all based off of the way calendar queries are done in cosmo
today.
I finally figured out some of what was going on. Every time an event is
created,
it is run through the CalendarFlattener which generates timeranges and
stores them
as node properties. I adapted the code to do the same thing, except
instead of
storing the timeranges as properties, I store them in a separate
calendar index
table, which is joined to the item table. Then instead of generating a
timerange xpath query, I generate a sql query based on the same algorithm.
So it should work as cosmo does today.
I looked at the way the freebusy query is done today and it looks like
you are
just generating a calendar query using a calendar filter, so that should
be supported
as well.
> the sandbox was copied from the trunk a few weeks ago. the only work
> that's happened on the trunk subsequent to the copy is the scooby
> merge, which is more or less independent of the hibernate work.
>
Ok, cool. I'm going to start merging stuff in soon. To prevent
breaking things in the
sandbox, I'll probably just merge stuff in as separate packages so as to
not conflict with the current model and dao definitions (think
org.osaf.cosmo.model.new).
Otherwise I see a lot of things breaking right away. Then I want to get
some
unit tests checked in and working.
> re maven - we host a repository at osaf where we can put jars that
> aren't available in the main repository. just let me know what
> specifically you need to be in there and i'll get that done. i wonder
> if you're thinking of the jta jar and others that aren't specifically
> publicly distributable on their own?
Yeah, jta.jar was one of them. There was also a library I was using
to generate uuids, jug.
> as a matter of fact, i've been working on the jcr-server updates for
> the last week and a half. i've got the code that uses jcr isolated
> into single package and have replaced it in the running server with
> new code that uses HomeDirectoryService to read and write content.
> this requires new service apis, since right now there's no way through
> HDS to actually save a resource, and so far i've been implementing
> those service apis with jcr daos. but once you've committed your
> hibernate code, i'll wire up HDS to use that instead, and the last 20%
> of the jcr-server work should be pretty straightforward. this is
> exciting!
Sweet, sounds good. I'll probably have more questions as I try to
merge stuff into the sandbox and get unit tests integrated into the
build too.
-Randy
More information about the cosmo-dev
mailing list