Chapter 7. Replication

Table of Contents

7.1. Overview
7.2. Replication Model
7.2.1. Simple Example
7.2.2. Replication from Client Nodes
7.2.3. Replication and Migration
7.2.4. Replication and Class Kinds
7.3. Requesting Replication
7.3.1. Using Methods of Object
7.3.2. Node Object Pointers
7.3.3. Requesting Replication by RPC
7.4. Accessing Object Replicas
7.5. Replication-related IDL Attributes
7.5.1. Node Types
7.5.2. Choosing Properties To Replicate
7.5.3. Replication and Migration Groups
7.5.4. Recommended Node Replication Masks
7.5.5. Custom Replication Flags and Masks
7.6. Replication and Migration Compared
7.7. Consistency of Replication Groups
7.8. Callbacks to Replicas
7.9. Replica Manager
7.10. Allowed and Illegal Operations
7.11. Massiv Demo Examples
7.12. Configuration and Statistics

7.1. Overview

The replication is used to keep read-only copies of managed objects on one or more nodes. These copies are called object replicas, or simply replicas. The Core automatically keeps object replicas up-to-date during their lifetime.

Replication serves two main purposes:

  • To keep up-to-date copies of objects needed for world presentation on client nodes. Server nodes decide which objects are relevant for the presentation (i.e. visible and/or audible) and request their replication to client nodes.

  • To optimize communication between objects, especially to reduce the communcation latency. If server node-side code wants to read properties (or call constant methods) of objects potentially owned by a different server node, it can request replication of such objects in advance and access object replicas instead of accessing the objects themselves over the network (using synchronous RPC for example).

On a single node, either object itself or its replica can exist, but never both of them. Replicas have the same object id as the original object and can be accessed using a weak pointer to the object (see Section 7.4, “Accessing Object Replicas”).