Table of Contents
Page 1 of 1

Table of Contents

About This Document

Purpose of This Document

Audience

How This Document Is Organized

PART ONE
Cloudsync User's Guide

1 Introducing Cloudsync

Introducing Cloudsync

Process Overview

Advantages of Cloudsync

Operating Environment

Cloudsync Capabilities

Creating Targets

Synchronizing Databases

Handling Conflicts

Writing and Deploying Cloudsync Applications

SQL-J Extensions for Cloudsync

2 Publications

Publication Basics

What a Publication Contains

Altering Publications

Altering Published Tables

Publishing Foreign Keys

Publishing Triggers

3 Creating a Synchronized System

Overview

Steps for Creating a Synchronized System

Determining the Database Type

Sample Code for Creating a Synchronized System

Configuring the System for Refresh Requests

Overview

Configuring Cloudsync for the Servlet API

Registering the Servlet

Refresh Request URL for the Servlet Listener

Configuring Cloudsync for Built-in HTTP Support

Port Numbers

Network Addresses

Moving the Source to a Different Machine

Debugging Network Configuration Errors

4 Synchronizing Databases

Agreement and Synchronization

The Refresh Operation

Provisional Transactions

Steps of the Refresh Operation

Applying Provisional Transactions at the Source

Scenario 1: The Transaction Applies Successfully

Scenario 2: A Consistency Error Occurs

Removing Records from SYSERRORS

Scenario 3: An Environmental Error Occurs and the Transaction Remains Provisional

Applying Source Data to the Target

Target Refresh Failures

Connection Failure

Other Failure

Concurrency During a Refresh

Refresh Frequency

Refreshes and Jar Files

Triggers and the Refresh Operation

Refreshing Copied Sources and Targets

Targets and Backups

5 Refresh Authentication

Overview of Refresh Authentication

Why You Should Authenticate Targets

Refresh Authentication Models

A Refresh Authentication Model for Single-Corporate-Entity Systems

Providing the User ID

Providing the Password

Refresh Authentication Models for Beyond-the-Firewall Systems

Two-Way SSL Authentication

Application-Defined Refresh Authentication with Refresh Authentication Callback

Configuring Your System for Successful JDBC Authentication at Refresh Time

Assigning a Single User ID to Targets

Setting a Password

Reference Section

The REFRESH Command

The Refresh Authentication Callback Class

Target Connection Attributes

The user Property: Reference

Upgrade Issues

Other Security Features

Encrypting Refresh Messages Using SSL

Using Work Units to Limit SQL Access to Data

Disabling Data Updates for Read-Only Targets

Encrypting Target Databases

6 Updates and Work Units

Updates from Multiple Targets

Controlling Update Behavior

Changed-Value Updates

Work Units

Understanding Work Units

Work Units are Applied Provisionally

Work Units Operate from Target to Source

Work Units Are Method Aliases

Benefits of Work Units

Using Work Units

SQL-J Extensions for Work Units

Creating a Work Unit

Invoking a Work Unit

Specifying the Connection in a Work Unit

Transactions and Work Units

Error Handling in Work Units

Altering Work Unit Methods

Getting Information About the Target at the Source

Saving Information Such as PreparedStatements Across a Refresh

7 Designing Synchronized Applications

Application Design Overview

Design Guidelines

Steps for Designing a Distributed System

Step 1: Defining the Application

Step 2: Listing the Operations

Step 3: Describing the System-Wide Data

Step 4: Describing the Target Data

Step 5: Listing the Inputs

Step 6: Listing the Outcomes

Step 7: Representing the Outcomes in the Database

Work Unit Examples

The placeOrder Work Unit

The Target-Side Method

The Source-Side Method

Using the placeOrder Work Unit

The sendLead Work Unit

The Target-side Method

The Source-side Method

Using the sendLead Work Unit

Work Unit Example Code

Publication Design Issues

Making Targets Small and Efficient

Target-Side Validation

Handling Published Foreign Keys

Designing Universal Keys

Cloudsync Universal Keys

Why Using Autoincrement Defaults with Cloudsync Is Problematic

8 Deploying Synchronized Systems

Configuring Source and Target Machines

What the Server Needs

What the Target Machine Needs

Distributing Application Code Within the Database

Example of Jar Files in a Database

Locally Configuring Target Database Properties

Setting Properties

Checking Property Values

9 Debugging Synchronized Systems

The printFailedTransaction Method

Creating a Method Alias

Using printFailedTransaction

Note to Cloudconnector Users

Example Queries

Understanding SYSERRORS Query Results

printFailedTransaction Output

For each failed transaction:

PART TWO
Cloudsync Reference

10 Cloudsync Commands Reference

ALTER PUBLICATION

COPY PUBLICATION

CREATE PUBLICATION

CREATE WORK ALIAS

DROP PUBLICATION

DROP WORK ALIAS

REFRESH

11 Cloudsync System Tables

SYSPUBITEMS

SYSPUBS

SYSSYNCINSTANTS

12 URL Attributes for Synchronization

convertToSource=true

createSource=true

createTargetFrom=copyFileName

13 Cloudsync Properties

cloudscape.authentication.refresh

cloudscape.database.readAccessTarget

cloudscape.database.refresh

cloudscape.database.sourceUser

cloudscape.database.synchronizationCleanup

cloudscape.DataComm.listenType

cloudscape.DataComm.port

cloudscape.DataComm.url

cloudscape.listener.synchronization.address

cloudscape.refresh.guaranteedRefreshInterval

cloudscape.synchronization.workUnitOnly

sysinfo.publicationID

sysinfo.publicationName

sysinfo.sourceDatabaseID

sysinfo.sourceDatabaseName

sysinfo.sourceServerAddress

PART THREE
Appendixes

Appendix A Illustrations of the Refresh Operation

Possible Outcomes of a Provisional Transaction

Timelines

A Simple Scenario

A Slightly More Complicated Synchronization Scenario

Index