Content Store Replication

cancel
Showing results for 
Search instead for 
Did you mean: 

Content Store Replication

resplin
Intermediate
0 0 1,818

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



High AvailabilityReplicationContent Store


Introduction


Clustered servers have to share content across the instances by replicating the content.  This article discusses some of the available options, as well as the design of future or desired components.


Existing Components


ReplicatingContentStore


ContentStoreReplicator


While the org.alfresco.repo.content.replication.ReplicatingContentStore (see Content_Store_Configuration) will replicate new content added to the store it will not automatically perform an exhaustive traversal of existing content in the primary content store and push it to the secondary stores.  For this task you'll need to configure the org.alfresco.repo.content.replication.ContentStoreReplicator:



   <bean id='contentStoreReplicator'
         class='org.alfresco.repo.content.replication.ContentStoreReplicator'
         depends-on='localDriveContentStore, networkContentStore' >
      <property name='sourceStore'>
          <ref bean='localDriveContentStore' />
      </property>
      <property name='targetStore'>
          <ref bean='networkContentStore' />
      </property>
   </bean>

which tells sets up the replicator to copy content from the localDriveContentStore to the networkContentStore, but we still need a trigger to start the job:



   <bean id='contentStoreBackupTrigger' class='org.alfresco.util.CronTriggerBean'>
      <property name='jobDetail'>
         <bean class='org.springframework.scheduling.quartz.JobDetailBean'>
            <property name='jobClass'>
               <value>org.alfresco.repo.content.replication.ContentStoreReplicator$ContentStoreReplicatorJob</value>
            </property>
            <property name='jobDataAsMap'>
               <map>
                  <entry key='contentStoreReplicator'>
                     <ref bean='contentStoreReplicator' />
                  </entry>
               </map>
            </property>
         </bean>
      </property>
      <property name='scheduler'>
         <ref bean='schedulerFactory' />
      </property>
      <property name='cronExpression'>
         <value>0 0 03 * * ?</value>
      </property>
   </bean>

Required Components


ContentStore Replicating over HTTP


Background


In some cluster configurations, the option to share content directly via a filesystem(s) doesn't exist.  If the machines are all live within the cluster, then it is not possible to push the content from one server to another using rsynch or some other delayed mechanism.  Instead, the content must be pulled onto the server that requires it.  Alfresco servers already have a DownloadContentServlet that is able to access content using NodeRef and path based references.


Requirements


  1. The ability to remotely request content from a server using a ContentStore content URL of the form store://....
  2. The notion of a read-only ContentStore

Implementation


  1. Additional get method on ContentService to access node-independent stream.  Access must be limited to admin privileged user only.
  2. Extend ContentDownloadServlet to access content via new new URL.
  3. Add ReadOnlyContentStore flag interface and ensure that it gets respected by ReplicatingContentStore.
  4. Cluster testing
  5. Estimated (without significant issues): 2 days implementation, 2 days testing

Issues


  1. Sharing of authentication tickets or force logins to each machine providing content in the cluster.
  2. Configuration of machines available in the cluster.