Copyright © 2007-2017 JumpMind, Inc
Permission to use, copy, modify, and distribute this SymmetricDS Tutorials Guide for any purpose and without fee is hereby granted in perpetuity, provided that the above copyright notice and this paragraph appear in all copies.
This guide explains how to quickly setup a demonstration of SymmetricDS to help you understand what a working system looks like.
Three nodes, which represent three embedded databases, will be installed. One node will represent a centralized corporate database and the other two nodes will represent two individual retail store databases.
For information on how to install SymmetricDS, please refer to the Installation section of the SymmetricDS User Guide.
1.1.1. Creating and Starting
The Demo button will automatically install three
nodes with synchronization pre-configured. This will allow
you to see a working model of SymmetricDS.
1.1.2. Initial Load
An initial load is the process of seeding tables at a target node with data from a source node. Instead of capturing data, data is selected from the source table using a SQL statement and then it is streamed to the client.
By default, the Demo does this action for you. However, it is worth noting that Initial Loads can be sent through the Manage→Nodes screen.
1.1.3. What’s Created
The demo databases are H2 Databases. You can connect to them using a sql explorer tool like Squirrel Sql. The connection information can be found in the properties files in the engines directory.
Please verify the databases by navigating to the Explore tab and using the database explorer on the left.
Find the item tables that sync from root to client (that is, from corp to store): item and item_selling_price.
Find the sales tables that sync from store to corp: sale_transaction and sale_return_line_item.
Validate the corp item tables have sample data.
1.2. Pulling Data
Next, we will make a change to the item data in the central office corp node database (we’ll add a new item), and observe the data being pulled down to the store.
1.2.1. Create Data
Create data in corp for all stores to pull.
Navigate to the SQL Explorer for the corp node and execute () the following scripts.
insert into item (item_id, name) values (110000055, 'Soft Drink'); insert into item_selling_price (item_id, store_id, price) values (110000055, '001', 0.65); insert into item_selling_price (item_id, store_id, price) values (110000055, '002', 1.00);
1.2.2. Verify Outgoing Batches
1.2.3. Verify Incoming Batches
1.2.4. Verify SQL
Verify the change directly in a store database.
select * from item_selling_price
|Make sure you have selected either store-001 or store-002 to run your query against.|
1.3. Pushing Data
We will now simulate a sale at the store and observe how SymmetricDS pushes the sale transaction to the central office.
1.3.1. Create Data
Create data in a store to be pushed to corp. Navigate to the SQL Explorer for the corp node and execute () the following scripts.
insert into sale_transaction (tran_id, store_id, workstation, day, seq) values (1000, '001', '3', '2014-03-21', 100); insert into sale_return_line_item (tran_id, item_id, price, quantity) values (1000, 110000055, 0.65, 1);
1.3.2. Verify Outgoing Batches
1.3.3. Verify Incoming Batches
1.3.4. Verify SQL
Verify the change directly in the corp database.
select * from sale_transaction;
select * from sale_return_line_item;
|Make sure you have selected corp-000 to run your query against.|
Congratulations! You have completed the Demo.
Continue to browse through the demo configuration to see how basic triggers, routers, group links and more are setup. When you are ready, uninstall the demo and begin your own configuration.
2. Quick Start
|To see a demonstration of a preconfigured SymmetricDS environment see the Demo tutorial.|
This guide will walk you through the minimum steps required to setup data synchronization through a single installation of SymmetricDS.
Connect Source Database
Connect Target Database
Download and install SymmetricDS from the JumpMind website.
|For complete installation instructions click here|
Open the control center to verify SymmetricDS server is running. If it is not start the server using the start server button. Then open the web console using the open web console button.