Marius Petria created SLING-3816:
------------------------------------
Summary: Use the same flow of operations for froward and reverse
replication
Key: SLING-3816
URL: https://issues.apache.org/jira/browse/SLING-3816
Project: Sling
Issue Type: Improvement
Components: Extensions
Reporter: Marius Petria
Current replication code treats differently the forward and reverse
replication. Forward replication creates a content package, adds it to a queue
and transports it to the other instance while reverse replication creates a
dummy POLL package, transports it to the other instance, retrieves the result
queues it and then installs it in the current instance.
The current flow for reverse replication complicates the code structure and can
be simplified by using three main entities:
1. Package Importers: can import(install) a replication package
1.a ReplicationPackageImporter
1.b ReplicationPackageImporterServlet bound to replication/importer resource
type
1.c http://localhost:4502/libs/sling/replication/importers.json
2. Package Exporters - can export (create) a replication package
2.a ReplicationPackageExporter
2.b ReplicationPackageExporterServlet bound to replication/exporter resource
type
2.c http://localhost:4502/libs/sling/replication/exporters.json
3. Replication Agents - coordinate the interaction between an exporter and an
importer using the following flow: exports a package, adds it to a queue, and
the imports the package.
3.a ReplicationAgent
3.b ReplicationAgentServlet bound to replication/agent resource type
3.c http://localhost:4502/libs/sling/replication/agents.json
Basically for forward replication the exporter is local and the importer is
remote while for reverse replication the difference is that the exporter is
remote and the importer is local.
--
This message was sent by Atlassian JIRA
(v6.2#6252)