The replication workers process actions as a batched database transaction or as single
database transactions. The lower the number of database transactions that are required to complete
the batch, the higher the throughput. The optimal throughput is achieved when the worker can process
all the actions that are required for the entire batch with a single database
transaction.
There are five primary actions that are associated with the inbound replication workers:
- Insert
- Export Only
- Update
- Export
and Delete
- Delete
If an entire batch consists of insert and export actions, Content Platform Engine processes the batch as a single insert transaction to the
database.
Update and delete
actions are processed as single database transactions.
A batch of action requests consisting of update and delete actions
generally requires many more transactions and more time to complete.
For example, an inbound batch has the following action codes (
Insert
doc 1, Insert doc 2, Insert doc 3, Update doc 2, Update doc 2, Insert
doc 4, Insert doc 5, Insert doc 6, Insert doc 7). Assuming
that no errors are encountered, the batch requires six transactions:
- Transaction 1: Insert first three documents (1, 2, 3)
- Transaction
2: Retrieve document (2) from database
- Transaction 3: Update
document (2)
- Transaction 4: Retrieve document (2) from database
- Transaction 5: Update document (2)
- Transaction 6: Insert
last four documents (4, 5, 6, 7)
There are three primary actions that are associated with the outbound replication workers:
- Initiate
- Update (includes update and delete pending actions)
- Dereplicate
The outbound journal selection on
Content Platform Engine assigns one
journal for the same document in each batch. Multiple actions for the same document are in different
batches. Within the same batch, different operations are sent in separate Remote Procedure Calls
(RPC) to
FileNet® Image Services.
For example, assume doc 1 was replicated. The following journals are in the replication queue
(
Initiate doc 2, Initiate doc 3, Update doc 2, Update doc 2, Update doc 1, Initiate doc 4,
Initiate doc 5, Initiate doc 6, Initiate doc 7). Assuming the batch size is 50, 3 RPCs are
required.
- Batch 1 RPC 1: Create documents 2, 3, 4, 5, 6, 7
- Batch 1 RPC 2: Update doc 1
- Batch 2 RPC 1: Update doc 2
- Batch 3 RPC 1: Update doc 2