Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 28340 invoked from network); 22 Oct 2004 16:20:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Oct 2004 16:20:29 -0000 Received: (qmail 58607 invoked by uid 500); 22 Oct 2004 16:20:19 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 58545 invoked by uid 500); 22 Oct 2004 16:20:19 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 58536 invoked by uid 99); 22 Oct 2004 16:20:18 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [129.79.246.27] (HELO whale.cs.indiana.edu) (129.79.246.27) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 22 Oct 2004 09:20:17 -0700 Received: from [127.0.0.1] (whale.cs.indiana.edu [129.79.246.27]) by whale.cs.indiana.edu (8.12.11/8.12.11/IUCS_2.62) with ESMTP id i9MGK990022703; Fri, 22 Oct 2004 11:20:11 -0500 (EST) Message-ID: <41793336.90008@cs.indiana.edu> Date: Fri, 22 Oct 2004 11:20:06 -0500 From: Aleksander Slominski User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-dev@ws.apache.org Subject: Re: use of immutable value object/interfaces [Re: [Axis2] OM API review/changes References: <200410220327.i9M3Rohn015755@moose.cs.indiana.edu> <41788AF5.5000402@cs.indiana.edu> <009701c4b832$147a2000$c24f4109@LANKABOOK> In-Reply-To: <009701c4b832$147a2000$c24f4109@LANKABOOK> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Sanjiva Weerawarana wrote: >Hi Alek, > > > >>if OMAttribute is immutable (so called value object) then once created >>the attribute can be shared safely and used when generating output in >>*multiple* threads! i think it is big gain when we have to generate >>again and again very similar looking SOAP messages ... >> >> > >We're talking about making the entire OMAttribute immudatble right? > > yes >That is, namespace name, local name, and value (and possibly later >stuff like type etc.)? > > yes - whole attribute is a value object. >In that case what are the scenarios where the *same* attribute is >used repeatedly in multiple messages (obviously it can't be in >the same message as an attribute cannot be held simultaneously >by two elements)? > if attribute is an immutable value object then it can be held simultaneously by multiple elements assuming you do not add parent property into attribute .... usage will depend how attribute heavy are your message or headers. if you have messages that use lot of enumerated attribute values you gain - one example of such type of XML is WS-Security. here is small snippet taken from a typical message (i do not want to reproduce whole few pages long XML ...): AAAAABBBBBBB== AAAAACCCCBB== as you can see URI and Algorithm attributes are essentially constants and it would be good to be able to reuse them (similarly to how String can be reused and garbage collected when not needed) for multiple message that will have signature on action header, destination header, and so on (so maybe even *all* secure messages ...) >I am definitely interested in the re-use idea (with its implied >memory and time performance improvement) but not sure whether it >occurs often. > > as far as i can see there is no penalty - if reuse happens you gain otherwise you loose nothing? thanks, alek -- The best way to predict the future is to invent it - Alan Kay