Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 126A9E785 for ; Fri, 15 Mar 2013 14:00:03 +0000 (UTC) Received: (qmail 18587 invoked by uid 500); 15 Mar 2013 14:00:02 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 18533 invoked by uid 500); 15 Mar 2013 14:00:02 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 18525 invoked by uid 99); 15 Mar 2013 14:00:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Mar 2013 14:00:02 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fmeschbe@adobe.com designates 64.18.1.181 as permitted sender) Received: from [64.18.1.181] (HELO exprod6og101.obsmtp.com) (64.18.1.181) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 15 Mar 2013 13:59:54 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob101.postini.com ([64.18.5.12]) with SMTP ID DSNKUUMpROd/2wq4djHMK9UYQis5jJXLTj/u@postini.com; Fri, 15 Mar 2013 06:59:33 PDT Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id r2FDuQ1v028557 for ; Fri, 15 Mar 2013 06:56:27 -0700 (PDT) Received: from nahub01.corp.adobe.com (nahub01.corp.adobe.com [10.8.189.97]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id r2FDxWAV022547 for ; Fri, 15 Mar 2013 06:59:32 -0700 (PDT) Received: from eurcas01.eur.adobe.com (10.128.4.27) by nahub01.corp.adobe.com (10.8.189.97) with Microsoft SMTP Server (TLS) id 8.3.298.1; Fri, 15 Mar 2013 06:59:32 -0700 Received: from eurmbx01.eur.adobe.com ([10.128.4.32]) by eurcas01.eur.adobe.com ([10.128.4.27]) with mapi; Fri, 15 Mar 2013 13:59:30 +0000 From: Felix Meschberger To: "dev@jackrabbit.apache.org" Date: Fri, 15 Mar 2013 13:59:29 +0000 Subject: Re: Getting a value by its data identifier Thread-Topic: Getting a value by its data identifier Thread-Index: Ac4hhVA2bDqTspP3TOW7FZfm4KgPGA== Message-ID: References: <8F5B0586-FB96-4296-9310-576FFF0D30F8@adobe.com> In-Reply-To: <8F5B0586-FB96-4296-9310-576FFF0D30F8@adobe.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi I created https://issues.apache.org/jira/browse/JCR-3534 with a patch imple= menting the proposed method along with a unit test validating round trippin= g. Regards Felix Am 12.03.2013 um 12:32 schrieb Felix Meschberger: > Hi all >=20 > we have a couple of use cases, where we would like to leverage the global= data store to prevent sending around and copying around large binary data = unnecessarily: We have two separate Jackrabbit instances configured to use = the same DataStore (for the sake of this discussion assume we have the prob= lems of concurrent access and garbage collection under control). When sendi= ng content from one instance to the other instance we don't want to send po= tentially large binary data (e.g. video files) if not needed. >=20 > The idea is for the sender to just send the content identity from Jackrab= bitValue.getContentIdentity(). The receiver would then check whether the su= ch content already exists and would reuse if so: >=20 > String ci =3D contentIdentity_from_sender; > try { > Value v =3D session.getValueByContentIdentity(ci); > Property p =3D targetNode.setProperty(propName, v); > } catch (ItemNotFoundException ie) { > // unknown or invalid content Identity > } catch (RepositoryException re) { > // some other exception > } >=20 > Thus the proposed JackrabbitSession.getValueByContentIdentity(String) met= hod would allow for round tripping the JackrabbitValue.getContentIdentity()= preventing superfluous binary data copying and moving. >=20 > Questions: >=20 > (a) Would such a method technically be possible (preventing actual large = binary data copy !) ? > (b) Would a patch be accepted ? > (c) Can we and if yes, how can we control access ? > (c) What else ? >=20 > Regards > Felix >=20 > -- > Felix Meschberger | Principal Scientist | Adobe >=20 >=20 >=20 >=20 >=20 >=20 >=20 -- Felix Meschberger | Principal Scientist | Adobe