MirrorSync configuration walkthrough

From 360Works Product Documentation Wiki
Revision as of 20:06, 22 August 2014 by Evan (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

We try to make the configuration process as simple as possible. If you have a question, hover over the blue question marks to see helpful tooltips. You can also watch a video of the installation here, or read through the following steps below. If you are still having problems, 360Works offers custom database development, including MirrorSync integration.

After pressing “Launch MirrorSync Client,” a desktop application will download and begin to walk you through the configuration process. A security dialog may appear, asking to enable the applet plug-in and Web Start applications. Choose Enable. A second security dialog might appear after, asking "The application 'MirrorSync' from 'ServerName' is requesting access to your computer. The digital signature from 360Works has been verified." Select Allow to continue.

After installation on FileMaker Server, users may configure the synchronization from any computer with access by navigating to http://servername/MirrorSync, where servername is replaced with the address of the server.

Blue question marks appear where more information and help is available. Log in using the username and password selected at the installation of MirrorSync.

To create a new MirrorSync, choose “Add” from the main screen. You may also import a configuration from this main screen, or edit existing configurations. The following window will appear:

image004.png

Select the options that are most relevant to your configuration.

Bidirectional sync
changes from either database are written to the other database.
One way sync
changes from a source database are written to a destination database. One way syncs could be used, for example, to push changes from an iPad to FileMaker Server.
Sequential primary keys
these keys are auto-incremented numerals. For example, 101, 102, 103 might be examples of sequential primary keys.
UUID
Universally Unique IDentifiers: are randomly generated combinations of numerals and letters with 36 total characters. UUIDs are new for FileMaker 12. For example, 510f2400-e63k-49f2-o428-64264480000.

UUIDs are preferable for several reasons, as they can be randomly generated on the offline copy and never happen to generate an ID that is already in use. They are also more secure, as sequential IDs are easily guessed. However, UUIDs are unavailable in FIleMaker 11.

Be sure the database is fully backed up before implementing MirrorSync. For a simple backup solution, consider 360Works SafetyNet.

image006.png

Next, enter the information for the database that already exists. Enter a description, host, username and password for the database, and select the database.

image008.png

After entering that information, MirrorSync pulls up a list of layout names and asks which tables should be synced. It is a good idea to create layouts specifically for MirrorSync, as this will sync only the fields the users require. Be sure to remove any summary fields, related fields, global fields, and calculations unless they are read only while implementing a one-way sync. An easy way to tell would be looking for a green hourglass in layout mode- if it doesn’t have one; it’s a summary field. At the moment, container fields are not supported with MirrorSync.

Every table requires a primary key and a modification timestamp. After creating these layouts without summary fields and excess data, be sure to include the primary key and modification timestamp. Then select these new sync layouts in MirrorSync.

image010.png

Next, choose the Primary Key and Modification Timestamp fields in MirrorSync. The Primary Key 2 field is optional and would be used if it were a join table that had multiple foreign keys, rather than a simple unique primary key.

image012.png

In the next screen, choose the foreign keys and primary keys for each table.

This screen will not appear if you are using UUIDs as a primary key. When using serial numbers, primary keys can be (and usually are) re-numbered when they are transferred to another device. MirrorSync needs to know which foreign keys which point to the primary keys, in order to write the new primary key value to each foreign key. When using UUIDs, the primary keys stay the same on every device because there is no possibility of conflict. Therefore, there is never a need to re-write foreign keys.

If there are multiple, enter the first selection for a table and a new line will appear. A foreign key is a unique number or ID that is used to relate tables. If the table does not use a foreign key, leave that table’s row blank.

image014.png

From that information, MirrorSync will pull an Entity Relationship Diagram mapping out the relationships between tables. Confirm that the diagram is correct by pressing Next.

image016.png

MirrorSync will automatically detect which fields are eligible for mapping, and display them in the next window. Users can toggle which fields to sync here with the checkbox. If there are certain fields that are very large or if fields don’t need to be synced, uncheck the box in this window. If a field is grayed out, the field is not writeable; for example, if there’s an auto enter option.

Finally, make the following changes to the database running live on the server. Once completed, a green checkmark will appear next to the step.

image017.png

Step 1: Click the button to copy the MirrorSync table onto the clipboard. Paste this into your solution using FileMaker Pro Advanced accessing the FileMaker Server file. Open the Manage Database (File > Manage > Database) dialog box, then make sure the Tables tab is open. Press Control + V or Command + V to paste it into the database.

Step 2: Create a new empty script called “MirrorSync” and leave it in the menu. To do this, open Scripts > Manage Scripts and press New.

Step 3: Copy the layout to the clipboard by pressing the Copy Layout button in MirrorSync. Go to layout mode in your solution (View > Layout) and select the MirrorSync layout. Select everything on the layout and delete existing content. Delete the header and footer (click the header button and press delete on the keyboard). Next, select Edit > Paste. If FileMaker asks you to expand the layout, choose yes. Move everything to the upper left corner. Save the layout with the Save Layout button.

Step 4: Click the Copy Script Steps button in MirrorSync. In FileMaker Pro Advanced, open the MirrorSync script (Scripts > Manage Scripts) and paste using Control + V or Command + V. MirrorSync dynamically generates the entire script based on the selections made previously. MirrorSync knows field names, table names, and more and hardcodes those names into the script. This eliminates the need for Evaluate() functions or Set Field By Name. If you change the sync configuration later, make sure to repeat this step after clearing everything in the script.

Step 5: Press Download File in MirrorSync to make a copy of the FileMaker file from FileMaker Server and open it in FileMaker Pro or FileMaker Go. This actually pauses FileMaker Server and downloads the copy so users do not need to log into Server Administration or close out files.

Run the “MirrorSync” script in FileMaker before making any changes, and again when syncs are required from the offline copy with the server. If desired, uncheck the script from the menu and link it to a button or menu option.

PLEASE NOTE: Whenever you want to give an offline copy of the database to another user or device, don’t use an offline file that has been modified. Only use files that have been freshly copied from the server, which have not yet been synced or modified.

Personal tools
Namespaces

Variants
Actions
Plug-in Products
Other Products
Navigation
Toolbox