Suite Replication¶
Replication service is responsible of transfering data between installations.
In legacy systems, this process is usually performed at database level via an
export -> share -> import
procedure using SQL scripts. In a microservices
world, however, this strategy becomes lacking when we start dealing with
multiple services, each with its own database and where we may need to persist
several copies of the same entity (because services may want to store views or
reflections of entities from different services).
A more fitting strategy for this scenario is replicating the events that took place in the system, replay these events in the destination installations and let each service handle them as required. This approach is known as message-based replication, where the broker handles the complexity of delivering data to each consumer.
Note
Message-based communication allows us to profit from all the advantages message-based communication brings as if messages were published in the actual broker, and decouples the replication logic from the entire ecosystem.
Key Concepts¶
Replication Site¶
A Replication Site
is nothing more than an Installation
that is configured
for replication.
Replication Sites are disposed as a hierachy, where each site can act either as a hub node or a destination node (or both):
- A replication site is a hub when it is referenced as such by at least one destination site.
- Each hub may have multiple destinations.
- Each replication site exposes a replication endpoint as an address where messages can be routed.
Topology¶
Refers to the set of hub-destination relationships resulting from configuring replication sites.
Replicable Message¶
Any message that is capable of being replicated. It should implement
IReplicableMessage
interface and have a proper SharingLevelId value set.
Message Transfer¶
A Message Transfer
refers to the established connection between a hub site and
a destination site. Message transfers are bidirectional by default.
Installed sharing levels¶
A set of configured sharing levels that are expected to be available in the installation, both for replication and filtering purposes.