Product Documentation

Clustering for Scalability and Availability

Previous Topic

Next Topic

Global Shared Data

In this chapter you will learn how to selectively replicate shared data from a centralized database across and within data centers to globally distributed applications to ensure they all use the same master and lookup data.

For more information, see Global Shared Data in Use Cases for FairCom Replication.

Preparation

To prepare for this tutorial, ensure that:

Following are the basic steps for implementing a replication plan for "Global Shared Data" mode with FairCom Server V12 zip packages. These steps apply to setting up replication between any FairCom Server types: FairCom DB, FairCom Edge, and c-treeRTG.

Connect to Replication Manager

  1. In a web browser, navigate to https://<ReplicationManagerHostName>:19992/
  2. Select Replication Manager.
  3. In the Connection Options dialog, enter appropriate credentials and click Connect.

    (If you have set up additional servers, your view will see more servers than shown below. This tutorial will utilize two FairCom Servers along with the FairCom Replication Manager Server.)

Create Test Tables

Connect FairCom FairCom SQL Explorer to the first FairCom Server by doing the following:

  1. In a web browser, navigate to https://<ReplicationManagerHostName>:19992/
  2. Select FairCom SQL Explorer.
  3. In the Connect to Server and Database dialog, enter the Hostname (or IP address) and Port Number (19791) for the first FairCom Server.
  4. With appropriate credentials entered, click Connect to Server.

  5. Right-click on Tables and select Create New Table.

  6. Populate table schema and create a new table:

  7. Click Create. A modal window will say "Table Successfully Created". Click OK on that window.

  8. Connect FairCom FairCom SQL Explorer to the second FairCom Server by doing the following:
    • Click the yellow "+" in the FairCom SQL Explorer window (upper-left).
    • In the Connect to Server and Database dialog, enter the Hostname (or IP address) and Port Number (19801) for the second FairCom Server.
    • With appropriate credentials entered, click Connect to Server.
    • Repeat the steps above (for creating a table in the first FairCom Server) to create a new table in the second FairCom Server, naming this table differently (e.g. "test2").

Set a Replication Plan

  1. In Replication Manager, drag two servers down into a configuration as shown below so that relationships can be drawn between them.

  2. Create a Replication Plan by dragging a line from the first FairCom server to the second. Make sure the mouse is toward the edge of one server icon before clicking and dragging the line to the second. The Replication Plan dialog should appear:

  3. Click the Create New Publication button:

  4. The table should be listed (typically prepended with "<username>_"). If the table is not listed, re-check the procedures in the previous step. Be sure the Published option is checked and click on Save & Close:

  5. The new publication should be listed in the left panel. Click the Subscribe button:

  6. Click Save to create the subscription based on the default options:

    Note: Click the Redirections button and verify that the source server is shown on the left, and the target server is on the right.

  7. Click the second panel (collapsed by default), with a directional arrow from the "Target Server" to the "Source Server":

  8. Click the Create New Publication button on the bottom right panel to create a publication on the second FairCom server:

  9. The second table created (e.g. "test2") should be listed. Check the Published option and click Save & Close:

  10. The new publication should be listed in the right panel. Click the Subscribe button:

  11. Click the Redirections button to see more details about the replication plan.

    Ensure the intended Source Server is on the left side and that the intended Destination Server is on the right.

  12. Click the Save button to create the subscription based on the default options:

  13. Click the Close button to confirm the Replication Plan creation:

  14. Right-click the Replication Plan line just created and select Deploy:

    At this moment, the Replication Plan deployment will execute the following actions in order to keep the read-only servers within the same database in sync:

    • Copy the published files from source server to the target and also the target to the source.
    • Start the two-way replication to keep the remote replica in sync.

Replication is now live between two FairCom Servers, each replicating a specific table to the other. Additional tables can be added to the replication plans, and additional servers can be added to the replication plan as needed.

TOCIndex