directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <>
Subject Re: [LDAP DAS] Efficient Updating of Persisted Objects
Date Wed, 21 Mar 2007 16:50:17 GMT
Hey David,

I just sent out a longer thang with more context, so maybe that will 
help a little WRT some of your question below.

I'm going to publish an Eclipse Plugin with design documentation recipes 
soon, I'm just getting a feel for whether
I should target generation of schema's for Classes right out of the 
gate, or save that for later in case it requires a lot
of modification in ADS.

Either way the DAS will do all the things you are wondering about below.

You could hand write SDO's.

But you will most likely want to generate them from some model.
With EMF you could generate them from Java Interfaces, XML Schema,
or an Ecore Model.

If you check out

There's a lot of good articles.

I would probably try to understand how EMF works first, with respect to 
a model (Javabeans) from an xml schema perhaps, and then look at some of 
the SDO articles.

Also, if you look at the pom.model.v400
project under rpm.factory.all in my sandbox
you will see that I regenerated the entire
Maven POM model from the Maven POM XML Schema.

The model classes generated are not SDOs.

But the EMF generator has a switch that you flip, making the classes
generated SDO classes.

Please let me know if I left anything out between this email and the one 
I just sent out,
and I'll elaborate further.

- Ole

David Jencks wrote:
> On Mar 21, 2007, at 1:06 AM, Ole Ersoy wrote:
>> Hey Guys,
>> Just wanted to see if anyone had any thoughts on handling updates
>> to Java beans (Service Data Objects - but basically the same thing) 
>> persisted with ADS.
> Maybe you documented this somewhere I missed, but could we back up a 
> little bit and see if we agree or understand what the goals are?
> For this to be useful to me in triplesec it needs to be able to do 
> what the framework I wrote does:
> - map single valued attributes in an entry to an object field
> - map single and multiple valued attributes to an object reference or 
> collection/map of object references respectively
> - map multiple valued attributes to collection valued fields of simple 
> types
> - map the natural ldap tree structure to object tree structure
> - leave out layers of the ldap tree that convey type information 
> rather than instance data (such as "ou=Application")
> those are the important ones I can remember... I hope I didn't leave 
> anything too critical out.
> Also I don't know much of anything about SDO.... do you write your own 
> POJOs and then map/enhance/code generate/?? to relate them to the 
> backend data store or are classes generated from a description of the 
> data store or are there generic data structures like a map of 
> attribute name to attribute value?
>> With Service Data Objects we create a datagraph that is then 
>> disconnected
>> from it's persistence source and we can mutate it. Then later we want to
>> persist the graph. Each object in the graph has a change summary, that
>> stores the fields that were updated.
> Tracking change information is usually desirable whether or not you 
> support disconnection.
>> This makes it possible to only update objects that have been changed, 
>> and
>> we only need to update the fields that were changed.
>> However, I think the DirContext will overwrite the entire
>> object during the bind operation, rather than updating specific 
>> fields on the object.
>> Initially I was thinking that the object's attributes (primitive 
>> properties - not references to other objects)
>> would be serialized and made into directory attributes. But I think a 
>> LDAP ObjectClass schema that corresponds to the
>> object's class (The class of the object we are persisting) would have 
>> to be generated and stored along with the instance.
> I don't know what you mean by this. Could you provide a simple 
> concrete example? Probably my lack of knowledge about ldap :-)
> thanks
> david jencks
>> This might lead to performance improvments, if doable...?
>> Thoughts?
>> Thanks,
>> - Ole

View raw message