[ https://issues.apache.org/jira/browse/JCR-3534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13640457#comment-13640457 ]
Alexander Klimetschek commented on JCR-3534: -------------------------------------------- I agree with Jukka - we are not talking about a protocol here that needs to be protected, but an API access. A replication protocol that would make use of this on top of Jackrabbit would need its own protection (e.g. SSL) to protect the message contents, but that should be clearly separated. BTW, yesterday I came across another use case that the solution should include: not only a shared DataStore between sender and receiver of that application-level replication mechanism, but also the case of multiple receivers (horizontally scaled boxes) that share one datastore. In this scenario the sender sends N replication messages to N receivers. Ideally you want to avoid sending large binaries N times, so one could imagine the receivers sharing a common DataStore (but not with the sender, as their is usually a strict firewall separation between sender and receiver and possibly a higher latency as they might reside in different data centers). In that case I imagine that after the first successful transfer of the binary to receiver 1 and storage in the DataStore, the other replications to the other receivers see that the binary is present already and don't need to send it over again (although one has to avoid that all replications happen at the same time to benefit from that). This means that one should be able to configure a shared secret in both the sender and receiver DataStores, so they could "trust" each other, but wouldn't necessarily have shared content. IMHO this case is even more applicable to real-world scenarios and performance benefits - because a shared DataStore between sender and receiver is definitely less possible than a shared DataStore among multiple receivers. > Add JackrabbitSession.getValueByContentId method > ------------------------------------------------ > > Key: JCR-3534 > URL: https://issues.apache.org/jira/browse/JCR-3534 > Project: Jackrabbit Content Repository > Issue Type: New Feature > Components: jackrabbit-api, jackrabbit-core > Affects Versions: 2.6 > Reporter: Felix Meschberger > Attachments: JCR-3534.patch > > > 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 > problems of concurrent access and garbage collection under control). When > sending content from one instance to the other instance we don't want to send > potentially large binary data (e.g. video files) if not needed. > The idea is for the sender to just send the content identity from > JackrabbitValue.getContentIdentity(). The receiver would then check whether > the such content already exists and would reuse if so: > String ci = contentIdentity_from_sender; > try { > Value v = session.getValueByContentIdentity(ci); > Property p = targetNode.setProperty(propName, v); > } catch (ItemNotFoundException ie) { > // unknown or invalid content Identity > } catch (RepositoryException re) { > // some other exception > } > Thus the proposed JackrabbitSession.getValueByContentIdentity(String) method > would allow for round tripping the JackrabbitValue.getContentIdentity() > preventing superfluous binary data copying and moving. > See also the dev@ thread > http://jackrabbit.markmail.org/thread/gedk5jsrp6offkhi -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira