Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 91511 invoked from network); 25 Feb 2011 00:01:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Feb 2011 00:01:44 -0000 Received: (qmail 81273 invoked by uid 500); 25 Feb 2011 00:01:44 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 81215 invoked by uid 500); 25 Feb 2011 00:01:43 -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 81208 invoked by uid 99); 25 Feb 2011 00:01:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Feb 2011 00:01:43 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 209.85.214.50 as permitted sender) Received: from [209.85.214.50] (HELO mail-bw0-f50.google.com) (209.85.214.50) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Feb 2011 00:01:35 +0000 Received: by bwz2 with SMTP id 2so2288264bwz.37 for ; Thu, 24 Feb 2011 16:01:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:reply-to:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=ueuo+xO2+jdXjGWus36fZUXtzirsj4IBO0S+9lNPcX0=; b=Bwtbt1jJb4hcV8uGOVOiAOwcIQDxSVBdKxk6DFae/3J322hBTHgk8cwKdWn0XOBaff oOkCy2l70Z0W13fnLue+mEzcfPEOHpSH8Nh+vQaDpNzjq1dTqFqCoKSiVtRq9rlyKg16 vi7uxD+ZjM2OSSFlkja08ukaCcUdhdaCkR+E8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=xrAblVZ0P9GyQrJK73F+Y0INgJl03c+OJkgMCaKhH+5OL4JiAosiuEWyiFVZekOJhV F36ceMuLGXxGQLFLOZ922ECEpMNkPe0jTTUtz4pD64oTe+8PAtbdl0X8kJR7g53TVxzu C1z38lCVNiIz6YE7v6SaOFe+wll09lf8SrQsA= Received: by 10.204.22.16 with SMTP id l16mr1372387bkb.198.1298592074559; Thu, 24 Feb 2011 16:01:14 -0800 (PST) Received: from emmanuel-lecharnys-MacBook-Pro.local (ran75-1-78-192-106-184.fbxo.proxad.net [78.192.106.184]) by mx.google.com with ESMTPS id j11sm41473bka.12.2011.02.24.16.01.10 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Feb 2011 16:01:11 -0800 (PST) Message-ID: <4D66F144.8060506@gmail.com> Date: Fri, 25 Feb 2011 01:01:08 +0100 From: Emmanuel Lecharny Reply-To: elecharny@apache.org User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: API cleanup update References: <4D66987D.1040005@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 2/24/11 10:12 PM, Alex Karasulu wrote: > On Thu, Feb 24, 2011 at 8:50 PM, Kiran Ayyagari wrote: >> On Thu, Feb 24, 2011 at 11:12 PM, Emmanuel Lecharny wrote: >>> Hi guys, >>> >>> just a quick heads up about what I'm working on. >>> >>> Currently, I'm removing all the useless Serializable implementation. I think >>> we went anal by declaring a lot of classes to be Sezializable, when there is >>> no reason for those classes to be serialized in any way. I have removed the >>> implementation for those classes : >>> (DirectoryServiceOperation) -> ChangePassword, GetCatalog, GetPrincipal >>> Value >>> BitString >>> OID >>> Csn >>> [Permission] -> {ItemPermission, UserPermission} >>> [UserClass] -> {AllUsers, ParentOfEntry, Subtree, ThisEntry, >>> [NamedUserClass] -> {Name, UserGroup}} >>> (SchemaObject) -> [AbstractSchemaObject] -> {AttributeType, DITContentRule, >>> DITStructureRule, LdapSyntax, >>> [LoadableSchemaObject] ->{LdapComparatorDescription, [Normalizer] -> {…}, >>> NormalizerDescription, >>> [SyntaxChecker] -> {…}, SyntaxCheckerDescription}, MatchingRule, >>> MatchingRuleUse, NameForm, ObjectClass} >>> >>> (xxx) are interfaces, [xxx] are Abstract classes. >>> >>> I still have the LdapComparator and the classes extending it implementing >>> Serializable, because JDBM serialize some comparators. I trully think it's a >>> confusion we should get rid of. There is no need to serialize SchemaObject >>> elements into the backend, when we just want to now which comparator to use. >>> Up to a point, the Table knows which kind of SchemaObject it stores, and can >>> grab the associated comparator using the SchemaManager. However, this is an >>> area I'm not comfortable with so I keep those classes implementing >>> Serializable. >>> >>> I'll do the same work for Externalizable, here are the classes implementing >>> this interface : >>> Externalizable classes : >>> ------------------------ >>> LdapPrincipal >>> ChangeLogEvent >>> ReplicaEventMessage >>> ParentIdAndRdn >>> (Entry) -> DefaultEntry, ImmutableEntry, ClonedServerEntry, >>> ClonedServerEntrySearch >>> (EntryAttribute) -> DefaultEntryAttribute >>> (Modification) -> DefaultModification >>> (Value) -> [AbstractValue] -> {BinaryValue, StringValue} >>> LdifEntry >>> Ava >>> Rdn >>> >>> >>> AFAICT, all of them have to be externalizable, because they all get >>> serialized at one point of another in the server (either in the backend, or >>> in the changeLog) >>> >>> However, I do think that depending on the default serialization process is a >>> *bad* thing : it's costly, and can be avoided. We cureently have a few >>> static classes (DnSerializer, RdnSerializer, AvaSerializer, EntrySerializer) >>> which handle the optimal serialization, we should add some more. >>> >>> Alex suggested to design a single Serializer class which can handle all >>> those serialization/deserialization, I'm 100% with him on that. >> having a single serializer class will force dependency on the packages >> that are not interested by a user trying to use just a portion of API > Yeah I did not think of this. Kiran is right. This will cause a single > point of dependency pulling in the kitchen sink. Rather we should have > different serializers for different classes. Absolutely. At first, I thought it was a good idea to gather all the serializer in a single place, but Kiran has a valid point here... -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com