Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 3669 invoked from network); 12 Jun 2007 08:04:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jun 2007 08:04:09 -0000 Received: (qmail 55322 invoked by uid 500); 12 Jun 2007 08:04:08 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 55285 invoked by uid 500); 12 Jun 2007 08:04:08 -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 55267 invoked by uid 99); 12 Jun 2007 08:04:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2007 01:04:08 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of pajbam@gmail.com designates 66.249.82.231 as permitted sender) Received: from [66.249.82.231] (HELO wx-out-0506.google.com) (66.249.82.231) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2007 01:04:02 -0700 Received: by wx-out-0506.google.com with SMTP id t5so1467905wxc for ; Tue, 12 Jun 2007 01:03:41 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=Xu0vsOHbygCsxBWKvDv6IC3k2/GG1TVxnjnX6dhck7tmfR54IXMJBIhcXELWoubpV+w7yJcTWkKl39kQfkjoBQzeo6VtzCCEQZ1jjywLyyGcs9Ym4pvHj4qfvVLmSOoxdZDP7W7+Hi5xyA4ckPmQKkuIpRFgQxGSlQhiXpmer1Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=M6j49k21842CL1gnQU+qezZONcNdvb2Eyc6SDhz9UCVc7R9puxjTm0QzpyXEVlji1h2NbhpYVvXFACUeTiLCIbWZ7yQTc3rt3F14Jy5NzvkfUHUeBVYCAxNqOV8MobJzzaq1mNJmoox8IRdwx+rQcz+K9t+NNE8XEL7um8gI1V0= Received: by 10.90.105.19 with SMTP id d19mr6144671agc.1181635420638; Tue, 12 Jun 2007 01:03:40 -0700 (PDT) Received: by 10.90.120.19 with HTTP; Tue, 12 Jun 2007 01:03:40 -0700 (PDT) Message-ID: <98d8c0860706120103p18a14194rf27fe89b8ee0f9a2@mail.gmail.com> Date: Tue, 12 Jun 2007 10:03:40 +0200 From: "Pierre-Arnaud Marcelot" Sender: pajbam@gmail.com To: "Apache Directory Developers List" Subject: Re: A control for enabling/disabling dynamic schema check ? In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2513_8502416.1181635420614" References: <98d8c0860706111502k9df4658s1bb38ab22b60d336@mail.gmail.com> X-Google-Sender-Auth: 8eaf186028af2484 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_2513_8502416.1181635420614 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Alex, I think you need to make the server only writable by the current session > using the > control to prevent other clients from making inconsistent updates. Exactly. That's why I wanted to use a control. To do a "per request" disabling feature. Schema check will always be activated unless the control is present in the request. Also it's a good idea to add parameters into the schema service and the > configuration > that could control this. > > Overall it's a good idea to be able to control the server in this fashion > however it does > not come without risk. Yes, I'm really aware of that. That's why a complete schema integrity checker will be built in the Dynamic Schema Editor, to prevent putting in the server a wrong schema configuration that could leave it in a unstable state. If you can write code to actually push schema into ou=schema > properly in the order of dependency leaves first then this would be a > easier task for > you than writing the control. I was actually thinking of writing some kind of "Scheduler" to perform request in a certain order, but it is really really painful. Let's say for example, a user has entered a wrong OID for an attribute type. He changes it in the plugin and pushes back the schema configuration in the server. In order to do that, with schema check activated, the plugin will need to: - first, find all nodes (attribute types and object classes) that depend on this attribute type - second, remove all these nodes - third, delete the entry corresponding to the attribute type with the wrong OID - forth, insert the new attribute type with the correct OID - fifth, re-insert the removed nodes I can't imagine what it will be when there will be dozens of modifications to commit... :( This is one of the examples that made me think about having the ability to deactivate the check on the schema. If this kind of mechanism could exist, committing the change would be easier: - first, delete the entry corresponding to the attribute type with the wrong OID - second, insert the new attribute type with the correct OID And we're done... I was thinking of a control, to be able to choose whether or not disabling the schema check on a 'per request' basis, but if it easier to implement using a stored procedure, or modifying a special "configuration" entry value, it's not a problem for me... I don't know the inside of the server enough to see what costs more... P-A M. ------=_Part_2513_8502416.1181635420614 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Alex,

I think you need to make the server only writable by the current session using the
control to prevent other clients from making inconsistent updates.

 Exactly. That's why I wanted to use a control. To do a "per request" disabling feature. Schema check will always be activated unless the control is present in the request.

Also it's a good idea to add parameters into the schema service and the configuration
that could control this.

Overall it's a good idea to be able to control the server in this fashion however it does
not come without risk.

Yes, I'm really aware of that. That's why a complete schema integrity checker will be built in the Dynamic Schema Editor, to prevent putting in the server a wrong schema configuration that could leave it in a unstable state.

If you can write code to actually push schema into ou=schema
properly in the order of dependency leaves first then this would be a easier task for
you than writing the control.

I was actually thinking of writing some kind of "Scheduler" to perform request in a certain order, but it is really really painful.
Let's say for example, a user has entered a wrong OID for an attribute type. He changes it in the plugin and pushes back the schema configuration in the server. In order to do that, with schema check activated, the plugin will need to:
- first, find all nodes (attribute types and object classes) that depend on this attribute type
- second, remove all these nodes
- third, delete the entry corresponding to the attribute type with the wrong OID
- forth, insert the new attribute type with the correct OID
- fifth, re-insert the removed nodes

I can't imagine what it will be when there will be dozens of modifications to commit... :(

This is one of the examples that made me think about having the ability to deactivate the check on the schema.
If this kind of mechanism could exist, committing the change would be easier:
- first, delete the entry corresponding to the attribute type with the wrong OID
- second, insert the new attribute type with the correct OID
And we're done...

I was thinking of a control, to be able to choose whether or not disabling the schema check on a 'per request' basis, but if it easier to implement using a stored procedure, or modifying a special "configuration" entry value, it's not a problem for me...
I don't know the inside of the server enough to see what costs more...

P-A M.
------=_Part_2513_8502416.1181635420614--