Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 83381 invoked from network); 28 Mar 2009 22:02:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Mar 2009 22:02:38 -0000 Received: (qmail 12818 invoked by uid 500); 28 Mar 2009 22:02:37 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 12738 invoked by uid 500); 28 Mar 2009 22:02:37 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 12729 invoked by uid 99); 28 Mar 2009 22:02:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Mar 2009 22:02:37 +0000 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=HTML_MESSAGE,SPF_PASS,SUBJECT_FUZZY_TION X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of andrea.gariboldi@gmail.com designates 209.85.132.251 as permitted sender) Received: from [209.85.132.251] (HELO an-out-0708.google.com) (209.85.132.251) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Mar 2009 22:02:31 +0000 Received: by an-out-0708.google.com with SMTP id c5so971935anc.10 for ; Sat, 28 Mar 2009 15:02:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=oVD/4dw/R/VkVsJerxKVwriNygzB7r4j9ESnVl6eDmw=; b=SL8ZddJGQdQSGymFaoIeerWiBtdxxAyD7rKxiIQFMbhhfroYun1wIOnPsMLMrblckC Y9BA5shklAE0BvKfpY8SqXLvf/+zOxeWqsrj7R1+x72s+hTdZUwWHAJram6fF4EMTq8p ZackeYkbv5hpGRM/yJ25AlIOa/2ce9uya/DQc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=jTg3J9MmOpa8DpeVjEZRGMKN5xUsBmZ4CY2OzdpK37Ez/yNpX0kY/cKS7XWyZ/ByQL GoPrUv2oGqd3eoZtopcDhH1SYY2gwPeS5LmYK3s3JpDQfNGDVu63Wc7UILwT+9Qag3qN O7euqEvyZtIjsgY2rv4hIEtKV6w8EvMgFeSqE= MIME-Version: 1.0 Received: by 10.100.57.19 with SMTP id f19mr2809466ana.72.1238277729859; Sat, 28 Mar 2009 15:02:09 -0700 (PDT) In-Reply-To: References: Date: Sat, 28 Mar 2009 23:02:09 +0100 Message-ID: Subject: Re: [ApacheDS] Ldif partition From: Andrea Gariboldi To: Apache Directory Developers List Content-Type: multipart/alternative; boundary=0016e6441e2838b8980466350088 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6441e2838b8980466350088 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Just wondering if is possible to start the server without any specific configuration: no system partition, no schema, no business partition, only have a (schema less/free) ou=config with the possible configuration options in it, "subscribed" by all modules needing some kind of configuration (by implementing a Configurable interface). For example you can have: dn: ou=config objectclass: top objectclass: organizationalUnit ou: config dn: ou=partitions,ou=config objectclass: top objectclass: organizationalUnit ou: partitions dn: partitionId=system,ou=partitions,ou=config objectclass: top objectclass: apachedsPartition partitionId: system partitionDn: ou=system description: you can specify an implClass attribute in this entry to configure the partition type dn: partitionId=schema,ou=partitions,ou=config objectclass: top objectclass: apachedsPartition partitionId: schema partitionDn: ou=schema description: you can specify an implClass attribute in this entry to configure the partition type Once you do an ldapmodify, lets say: dn: partitionId=system,ou=partitions,ou=config changetype: modify add: implClass implClass: org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition the JdbmPartition could implement a Configurable interface and tell the core (that is listening on the ou=config tree for Configurable interfaces) it need a configuration branch beside its entry (partitionId=system,ou=partitions,ou=config), lets say: dn: ou=jdbmIndexes,partitionId=system,ou=partitions,ou=config objectclass: top objectclass: organizationalUnit ou: jdbmIndexes description: you can add jdbmIndex entries under this entry to configure indexes so that you can add an index, ldapadd: dn: attributeId=uid,ou=jdbmIndexes,partitionId=system,ou=partitions,ou=config objectclass: top objectclass: jdbmIndex attributeId: uid cacheSize: 1000 etc etc... The interface could look like this: public interface Configurable { public EntryFilteringCursor getConfigOptions(ConfigContext ctx) throws Exception; } Does this make sense? Andrea 2009/3/28, Alex Karasulu : > > Just one more comment. At this point the best solution I can think of is > querying each component in the wired hierarchy for all it's configurable > settings to build the required LDIF entries and depositing them into an LDIF > file. This is less than optimal I think but I don't see very many options. > > On Sat, Mar 28, 2009 at 7:21 PM, Alex Karasulu wrote: > >> Hi all, >> >> During ApacheCon Stephan Zoerner pointed out something very interesting >> about an ldif based configuration. Initially we had thought the hardest >> problem was to figure out how to synchronize changes made to the ldif files >> with changes being made to the same data through the LDAP protocol. I think >> we can handle this easily however this point Stephan made has left me a >> little perplexed. >> >> Stephan pointed out the fact that we have both standalone configuration >> driven by some kind of configuration file and manual programatic wiring of >> the server in embedded scenarios which often will not have the ldif >> configuration file. In the case with manual configuration some kind of ldif >> representation would need to be generated to reflect the wiring. I have no >> idea how this can be achived gracefully. I was putthing this out there to >> solicit others for some advice on this matter. >> >> Any suggestions are welcome. >> >> Thanks, >> Alex >> > > --0016e6441e2838b8980466350088 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Just wondering if is possible to start the server without any specific conf= iguration: no system partition, no schema, no business partition,
only h= ave a (schema less/free) ou=3Dconfig with the possible configuration option= s in it, "subscribed" by all modules needing some kind of configu= ration (by implementing a Configurable interface).

For example you can have:

dn: ou=3Dconfig
objectclass: topobjectclass: organizationalUnit
ou: config

dn: ou=3Dpartitions,o= u=3Dconfig
objectclass: top
objectclass: organizationalUnit
ou: pa= rtitions

dn: partitionId=3Dsystem,ou=3Dpartitions,ou=3Dconfig
objectclass: to= p
objectclass: apachedsPartition
partitionId: system
partitionDn: = ou=3Dsystem
description: you can specify an implClass attribute in this = entry to configure the partition type

dn: partitionId=3Dschema,ou=3Dpartitions,ou=3Dconfig
objectclass: to= p
objectclass: apachedsPartition
partitionId: schema
partitionDn: = ou=3Dschema
description: you can specify an implClass attribute in this = entry to configure the partition type


Once you do an ldapmodify, lets say:

dn: partitionId=3Dsyste= m,ou=3Dpartitions,ou=3Dconfig
changetype: modify
add: implClass
im= plClass: org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPar= tition

the JdbmPartition could implement a Configurable interface and tell the= core (that is listening on the ou=3Dconfig tree for Configurable interface= s)
it need a configuration branch beside its entry (partitionId=3Dsyste= m,ou=3Dpartitions,ou=3Dconfig), lets say:

dn: ou=3DjdbmIndexes,partitionId=3Dsystem,ou=3Dpartitions,ou=3Dconfigobjectclass: top
objectclass: organizationalUnit
ou: jdbmIndexesdescription: you can add jdbmIndex entries under this entry to configure i= ndexes

so that you can add an index, ldapadd:

dn: attributeId=3Duid,ou= =3DjdbmIndexes,partitionId=3Dsystem,ou=3Dpartitions,ou=3Dconfig
objectcl= ass: top
objectclass: jdbmIndex
attributeId: uid
cacheSize: 1000

etc etc...

The interface could look like this:

public interfa= ce Configurable
{
=A0=A0=A0=A0 public EntryFilteringCursor getConfigO= ptions(ConfigContext ctx) throws Exception;
}

Does this make sens= e?

Andrea

2009/3/28, Alex Karasulu= <akarasulu@apache.org>:<= /span>
Just one more comment.=A0 At this point the best solution I can think of is= querying each component in the wired hierarchy for all it's configurab= le settings to build the required LDIF entries and depositing them into an = LDIF file.=A0 This is less than optimal I think but I don't see very ma= ny options.


On Sat, Mar 28, 2009 at 7:21 PM, Alex Karasu= lu <akarasulu@= apache.org> wrote:
Hi all,

During ApacheCon Stephan Zoerner pointed out something very = interesting about an ldif based configuration. Initially we had thought the= hardest problem was to figure out how to synchronize changes made to the l= dif files with changes being made to the same data through the LDAP protoco= l.=A0 I think we can handle this easily however this point Stephan made has= left me a little perplexed.

Stephan pointed out the fact that we have both standalone configuration= driven by some kind of configuration file and manual programatic wiring of= the server in embedded scenarios which often will not have the ldif config= uration file.=A0 In the case with manual configuration some kind of ldif re= presentation would need to be generated to reflect the wiring.=A0 I have no= idea how this can be achived gracefully.=A0 I was putthing this out there = to solicit others for some advice on this matter.

Any suggestions are welcome.

Thanks,
= Alex


--0016e6441e2838b8980466350088--