Quantcast
Channel: MirrorSync by 360Works Latest Topics
Viewing all articles
Browse latest Browse all 492

Speed up sync - different replication frequency for tables?

$
0
0

Hello all - 

 

I'm thinking about MirrorSync for a Filemaker Server to Filemaker Server replication. 

The old problem: Office in CA, Office in NY - latencies kill the Filemaker Pro clients that are on the other coast when connected to FMS on the other coast. 

 

Think of our database as a medical records system for patients in a clinic that also manages patient handling. 

 

Currently, we have one main table, PATIENTS. 

One of the fields in this table, PATIENT_STATUS, is a numerical value that ranges from 0 to 6 (0 patient just showed up, 1 patient in waiting room, 2 patient seeing the nurse, 3 patient seeing the doctor, 4 report transcribed, 5 prescription issued, 6 patient discharged). 

The workstations display lists showing the patients in each status. Obviously, as patients come and go, status changes, and we need as close to real time updates as we can get on these. 

 

Now, if you think about syncing a CA server with a NY server - that is easy enough, and i don't mind if it takes a minute to sync - but each respective office has fast local performance. 

 

I'm not sure what best practice would be to improve sync performance. In our current setup, the main table, PATIENTS, has about 150.000 records - comprising the 20 patients that are sitting in the clinic now, with PATIENT_STATUS from 0-5; but also, 149.980 records comprising discharged patients with with PATIENT_STATUS = 6. 

I need sync to be as fast as possible for the 20 patients that are in the office now; but I could absolutely do with less frequent sync intervals for the remaining 149.980 records. 

Also, something tells me that syncing 20 records would take a lot less time than syncing 150.000 records - especially when you try to get sync intervals down to a few seconds. 

 

My options, as I understand, are: 

1- Leave the database structure as is, and hope it will be fast enough for our purposes (let filemaker handle the load)

2- Split the PATIENT table up in two tables: CURRENT_PATIENTS and ARCHIVE_PATIENTS. I would then run a mirrorsync every five seconds on the CURRENT_PATIENTS, but only once an hour on ARCHIVE_PATIENTS. 

This may come with its own set of problems, as we also search for patients by name and I'd have to script two consecutive searches, one in CURRENT_PATIENTS and one in ARCHIVE_PATIENTS and then merge the results somehow. 

I also imagine that splitting my tables would be quite a bit of work, adjusting layouts, scripts, and relationships. 

Lastly, upon discharge, the entire record would have to be moved over from the table CURRENT_PATIENTS to ARCHIVE_PATIENTS. 

3 - Do the same as described in 2, but also create a new join table that servers as my new main table: GLOBAL_PATIENT, with a PATIENT_ID primary key that is related to a PATIENT_ID key in CURRENT_PATIENTS, but also to PATIENT_ID in ARCHIVE_PATIENTS. 

It is my understanding that in this approach, all that I would need to change in searches is to search GLOBAL_PATIENT as opposed to both the ARCHIVE_ and the CURRENT_ tables. 

Option 2 and 3 may well be the same, but to me, they seem different. 

I am not sure if I am missing out on potential other ways to make this work. 

I would appreciate any advice ....

 

Have a great day!

 

 


Viewing all articles
Browse latest Browse all 492

Trending Articles