You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lecharny <el...@apache.org> on 2009/10/21 02:34:53 UTC

[Schema refactoring] One step further

Sorry for having been mute for the past few days, I was busy doing some 
documentatiuon for a client of mine... No fun :/

Here is where I'm doing atm :
- defining a SchemaManager class which will expose a set of methods to 
load schemas and schemaObjects
- implementing it for the most common cases
- using it in the server

This is not really fast, as it leads to a lot of redefinitions, but once 
started, it won't be too complicated.

In the mean time, there are a few points that need to be discussed. 
First of all, we should not anymore access the internal registries 
(AttributeType registry, etc) directly, but using the SchemaManager to 
do so. The idea is to protect them from concurrent access.

So all the places in the server where we were getting a ref to these 
internal registries must now use the SchemaManager instead. (It should 
not be a big deal).

Another point is that the SchemaManager will also be relative to a 
naming context? Right now, the only supported NamingContext will be the 
RootDSE. However, in the future, its hould be easy to define more than 
one SchemaManager and use them.

Last, not least, any modification on the Registries will be done on a 
clone (the clone methods have already been committed), and if the 
Registries are still consistent, then the Registries will be swapped. 
That will protect them from a concurrent access (we will use the 
volatile keyword for that purpose). That also means we don't use 
ConcurrentHashMap for stored data in the intenal registries°;

More code to come in the next few days...

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: [Schema refactoring] One step further

Posted by Alex Karasulu <ak...@gmail.com>.
sounds good

On Wed, Oct 21, 2009 at 3:34 AM, Emmanuel Lecharny <el...@apache.org>wrote:

> Sorry for having been mute for the past few days, I was busy doing some
> documentatiuon for a client of mine... No fun :/
>
> Here is where I'm doing atm :
> - defining a SchemaManager class which will expose a set of methods to load
> schemas and schemaObjects
> - implementing it for the most common cases
> - using it in the server
>
> This is not really fast, as it leads to a lot of redefinitions, but once
> started, it won't be too complicated.
>
> In the mean time, there are a few points that need to be discussed. First
> of all, we should not anymore access the internal registries (AttributeType
> registry, etc) directly, but using the SchemaManager to do so. The idea is
> to protect them from concurrent access.
>
> So all the places in the server where we were getting a ref to these
> internal registries must now use the SchemaManager instead. (It should not
> be a big deal).
>
> Another point is that the SchemaManager will also be relative to a naming
> context? Right now, the only supported NamingContext will be the RootDSE.
> However, in the future, its hould be easy to define more than one
> SchemaManager and use them.
>
> Last, not least, any modification on the Registries will be done on a clone
> (the clone methods have already been committed), and if the Registries are
> still consistent, then the Registries will be swapped. That will protect
> them from a concurrent access (we will use the volatile keyword for that
> purpose). That also means we don't use ConcurrentHashMap for stored data in
> the intenal registries°;
>
> More code to come in the next few days...
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>


-- 
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org