Skip to main content



      Home
Home » Modeling » EMF » [CDO] Customizing Repository Cloning
[CDO] Customizing Repository Cloning [message #1526685] Wed, 24 December 2014 14:05 Go to next message
Eclipse UserFriend
I have the following use case in which I'm hoping I can customize the CDO offline cloning process.

1) The CDO repository is housed on an intranet and contains sensitive information.
2) We would like to replicate the repository to a CDO server hosted on the internet but with the sensitive information removed before transmission over the internet.

Ideally there would be some sort of hook where in the synchronization process I can check the object type, and if it contains sensitive information the string attributes will be blanked before transmission over the internet to the remote repository clone.

Is this possible?

Thanks!
Re: [CDO] Customizing Repository Cloning [message #1531264 is a reply to message #1526685] Sat, 27 December 2014 04:46 Go to previous messageGo to next message
Eclipse UserFriend
Hi Gabe,

The synchronization process is orchestrated by an implementation of the interface
org.eclipse.emf.cdo.spi.server.InternalRepositorySynchronizer. The default implementation
org.eclipse.emf.cdo.internal.server.syncing.RepositorySynchronizer is internal and was not meant to be extended. You can
try, though. There are two places where modeled data is transferred:

1) org.eclipse.emf.cdo.internal.server.syncing.RepositorySynchronizer.ReplicateRunnable.run(), which is executed
directly after the start of the clone repository to replicate data that has been committed to the master while the clone
was offline.

2) org.eclipse.emf.cdo.internal.server.syncing.RepositorySynchronizer.CommitRunnable.doRun(), which is executed when the
clone's remote session notifies about successful remote commits.

Looking at your scenario again it strikes me that you don't want to customize the clone but rather your inhouse master.
That would mean that you'd need to customize the two peer places that correspond to the ones I listed above. That would be:

1a) org.eclipse.emf.cdo.internal.server.Repository.replicateRaw(CDODataOutput, int, long) or
org.eclipse.emf.cdo.internal.server.Repository.replicate(CDOReplicationContext).

2a) org.eclipse.emf.cdo.internal.server.SessionManager.sendCommitNotification(CommitNotificationInfo).

I strongly recommend to treat the clone as a read-only repository in your case with cloned CDORevisions having the same
IDs as their remote equivalents but different content.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper




Am 24.12.2014 um 20:05 schrieb Gabe Colburn:
> I have the following use case in which I'm hoping I can customize the CDO offline cloning process.
>
> 1) The CDO repository is housed on an intranet and contains sensitive information.
> 2) We would like to replicate the repository to a CDO server hosted on the internet but with the sensitive information
> removed before transmission over the internet.
>
> Ideally there would be some sort of hook where in the synchronization process I can check the object type, and if it
> contains sensitive information the string attributes will be blanked before transmission over the internet to the
> remote repository clone.
>
> Is this possible?
>
> Thanks!
Re: [CDO] Customizing Repository Cloning [message #1533506 is a reply to message #1526685] Sun, 28 December 2014 11:21 Go to previous message
Eclipse UserFriend
Thanks a ton for your suggestions Eike. The cloned repository will indeed be used read-only. I'll give your suggestions a try now that I know where to get started.

Thanks,
-Gabe
Previous Topic:One EClass for Two Ecore models
Next Topic:XCore Annotation Support
Goto Forum:
  


Current Time: Wed Jul 23 16:30:57 EDT 2025

Powered by FUDForum. Page generated in 0.03529 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top