synchronisation:introduction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
synchronisation:introduction [2023/01/27 12:47] – [How to tell if synchronisation is happening] Gary Willettssynchronisation:introduction [2023/11/15 21:28] (current) – [Data types] Craig Drown
Line 13: Line 13:
 ==== Definitions ==== ==== Definitions ====
  
-  * The **//central server//** (a.k.a. **//sync server//**) is a central mSupply server. In any given setup, there will only be //one// central server, which must be running a //web server//, and it is responsible for:+  * The **//Central server//** (a.k.a. **//sync server//**) is a central mSupply server. In any given setup, there will only be //one// central server, which must be running a //web server//, and it is responsible for:
     * aggregating the store data from all stores => enables centralised reporting, and a real-time backup     * aggregating the store data from all stores => enables centralised reporting, and a real-time backup
     * controlling how all of the stores sync with each other     * controlling how all of the stores sync with each other
Line 24: Line 24:
     * the syncing process is initiated from each remote site on a schedule, and pushes its own updated records to the central server first, before pulling any updated records from the central server     * the syncing process is initiated from each remote site on a schedule, and pushes its own updated records to the central server first, before pulling any updated records from the central server
  
-  * For most installations, the central server and the primary server are one and the same, but for **//mirrored//** systems (see [[synchronisation:introduction#mirrored_sync|Mirrored sync]] below for details) they can be different - in that case the primary server is just a special case of a remote site. +=== Primary vs Central vs Mirror servers === 
-  * The central server, and all of the remote sites are collectively referred to as **//sync sites//**. + 
-  * Each sync site has a unique ID and connection parameters (IP address, username and password), setup in the [[preferences:synchronisation|synchronisation preferences]], along with a list of the other sync sites with which it can send/receive synchronisation data. These settings are complicated, easy to get wrong, and so should //only be modified by Sustainable Solutions//.+  * For most installations, the **//Central server//** and the primary server are one and the same, but for **//mirrored//** systems (see [[synchronisation:introduction#mirrored_sync|Mirrored sync]] below for details) they can be different - in that case the primary server is just a special case of a remote site. 
 +  * The **//Central server//**, and all of the remote sites are collectively referred to as **//sync sites//**. 
 +  * Each sync site has a unique ID and connection parameters, along with a list of the other sync sites with which it can send/receive synchronisation data. These settings are complicated, easy to get wrong, and so are now only configured 'programmatically'
 + 
 +=== Active vs Collector === 
 + 
 +  * Each store must be **//Active//** on a //single// sync site, and that is where its own store data can be added, edited, and deleted. 
 +  * The **//Central server//** can have **//Active//** stores on it. 
 +  * Each store that is **//Active//** on a **//remote site//** has a **//Collector//** copy of the store on the **//Central server//**.  Therefore, there are copies of //all// stores exist on the **//Central server//** 
 +  * **//Collector//** copies of stores are //full read-only// copies of the store.  These can be logged into and reported on. 
 + 
 +=== Sync and data integrity ===
  
-  * Multiple copies of the same store can exist across multiple sites (see [[synchronisation:introduction#store_setup|Store setup]] below for details), but they can have different store types on different sites: 
-    * each store is **//active//** on a //single// sync site, and that is where its own store data can be added, edited, and deleted 
-    * a **//collector//** copy of a store is a //full read-only copy// of the store - these will usually exist on the central server, and can be logged into and reported on 
-    * a **//transfer//** copy of a store is a //partial read-only copy// of the store - these exist on other sites where the store is visible, to enable the site's active store(s) to send and receive transfers 
  
   * To preserve data integrity, and to avoid potential clashes where more than one sync site tries to modify the same record, //only one sync site can edit/update any specific type of data//. There are some special cases (see [[synchronisation:introduction#data_types|Data types]] below for details), but most data falls into one of the following main types:   * To preserve data integrity, and to avoid potential clashes where more than one sync site tries to modify the same record, //only one sync site can edit/update any specific type of data//. There are some special cases (see [[synchronisation:introduction#data_types|Data types]] below for details), but most data falls into one of the following main types:
Line 200: Line 207:
   * **//Local data//** can be edited or imported on any site but doesn't sync anywhere   * **//Local data//** can be edited or imported on any site but doesn't sync anywhere
   * **//Sync data//** can only be edited on the central server but doesn't directly sync anywhere   * **//Sync data//** can only be edited on the central server but doesn't directly sync anywhere
-  * **//Message data//** can be edited on any site and syncs according to the sending/receiving store+  * **//Message data//** can be created on any site and syncs according to the sending/receiving store, but can't be edited anywhere
   * Some data can fall into more than one type, depending on the situation.   * Some data can fall into more than one type, depending on the situation.
  
-^  Data  ^  Type   Notes  ^ +^  Data  ^  'Normal' Sync  ^  If using Mirror Sync ^  Notes  ^                                                                                                  
-| Items | Central | Including item-related data e.g. item categories, units, BOM masters | +| Items | Central | Primary | Including item-related data e.g. item categories, units, BOM masters |  
-| Names (except patients) | Central | Including name-related data e.g. name categories, contacts, tags | +| Names (except patients) | Central | Primary | Including name-related data e.g. name categories, contacts, tags |  
-| Merging of items, units and names (except patients) | Central | | +| Merging of items, units and names (except patients) | Central | Primary |  |  
-| Groups and departments | Central | | +| Groups and departments | Central | Primary |  |  
-| Item master lists and programmes | Central | | +| Item master lists and programmes | Central | Primary |  |  
-| Budgets, periods and accounts | Central | | +| Budgets, periods and accounts | Central | Primary |  |  
-| Transaction categories and payment types | Central | | +| Transaction categories and payment types | Central | Primary |  |  
-| Purchase order categories | Central | | +| Purchase order categories | Central | Primary |  |  
-| Custom data | Central | | +| Custom data | Central | Primary |  |  
-| Barcodes | Central | | +| Barcodes | Central | Primary |  |  
-| Currencies | Central | | +| Currencies | Central | Primary |  |  
-| Options and properties | Central | | +| Options and properties | Central | Primary |  |  
-| Location types | Central | | +| Location types | Central | Primary |  |  
-| Regimens and indicators | Central | | +| Regimens and indicators | Central | Primary |  |  
-| Drug interactions and warnings | Central | | +| Drug interactions and warnings | Central | Primary  |  
-| Abbreviations and item directions | Central | Dispensary data | +| Vaccinators and vaccine settings | Central | Primary |  |  
-| Diagnoses | Central | Dispensary data | +| Custom reports | Central | Primary | Standard reports are regenerated on each upgrade |  
-| Insurance providers | Central | Dispensary data | +| Asset settings | Central | Primary |  |  
-| Patient event types | Central | Dispensary data +| Regions | Central | Primary |  |  
-| Vaccinators and vaccine settings | Central | | +Incoterms and tender conditions Central Primary |  |  
-| Custom reports | Central | Standard reports are regenerated on each upgrade | +Abbreviations and item directions Central Primary | Dispensary data  |  
-| Asset settings | Central | | +Diagnoses Central Primary | Dispensary data  |  
-| Regions | Central | | +| Insurance providers | Central | Primary | Dispensary data  |  
-Sites and sync-related preferences Sync Changes on the central server indirectly update related records on remote sites +| Patient event types | Central | Primary | Dispensary data  |  
-Dashboard reports Sync | | +| Stores and non sync-related store preferences | Central store | Primary |  |  
-Messages Message Depends on sending and/or receiving store (which can be blank) +| Purchase orders (centralised) | Central store | Primary |  |  
-| Stores and non sync-related store preferences | Central store | | +| Tenders and quotes (centralised) | Central store | Primary |  |  
-| Purchase orders (centralised) | Central store | | +| Payments (centralised) | Central store | Primary |  |  
-| Payments (centralised) | Central store | | +| Visibility of items and names (except patients) | Central store | Primary |  |  
-| Visibility of items and names (except patients) | Central store | | +| Visibility of existing patients and prescribers | Central store | Primary |  |  
-| Visibility of existing patients and prescribers | Central store | | +| Sites and sync-related preferences | Sync | Central | Changes on the central server indirectly update related records on remote sites |  
-| Visibility of new patients and prescribers | Patient | New visibility records sent to central server | +| Dashboard reports | Sync | Central |  |  
-| Patients and prescribers | Patient | Including patient-related data e.g. PMR, insurance policies | +| Messages | Message | Store | Depends on sending and/or receiving store (which can be blank) |  
-| Merging of patients and prescribers | Patient | | +| Visibility of new patients and prescribers | Patient | Store | New visibility records sent to central server |  
-Repeats | Patient | Dispensary data | +| Patients and prescribers | Patient | Store | Including patient-related data e.g. PMR, insurance policies |  
-Patient events | Patient | Dispensary data | +| Merging of patients and prescribers | Patient | Store |  |  
-| Name notes | Store | | +Patient events | Patient | Store | Dispensary data  |  
-| Customer stock history and requisitions | Store | | +Repeats | Patient | Store | Dispensary data; preference can be set to allow processing on all sites where the patient is visible |  
-| Locations | Store | | +| Prescriptions | Patient | Store | Preference can be set sync to all sites where the patient is visible |  
-| Merging locations | Store | | +| Name notes | Store | Store |  |  
-| Stock and replenishments | Store | | +| Customer stock history and requisitions | Store | Store |  |  
-| Stocktakes and inventory adjustments | Store | | +| Locations | Store | Store |  |  
-| AMC projections | Store | | +| Merging locations | Store | Store |  |  
-| Transactions and prescriptions | Store | Including other transaction-related data e.g. backorders, builds | +| Stock and replenishments | Store | Store |  |  
-| Transaction notes | Store | | +| Stocktakes and inventory adjustments | Store | Store |  |  
-| Item notes | Store | | +| AMC projections | Store | Store |  |  
-| Boxes | Store | | +| Transactions (but not prescriptions) | Store | Store | Including other transaction-related data e.g. backorders, builds |  
-| Goods received | Store | | +| Transaction notes | Store | Store |  |  
-| Indicator values | Store | | +| Item notes | Store | Store |  |  
-| Vaccine monitors/sensors | Store | | +| Boxes | Store | Store |  |  
-| Assets | Store | | +| Goods received | Store | Store |  |  
-| Store credentials | Store | | +| Indicator values | Store | Store |  |  
-| Authorisers and authorisation | Store | | +| Vaccine monitors/sensors | Store | Store |  |  
-| Purchase orders | Store | Except for centralised procurement or supervisor-mode ordering | +| Assets | Store | Store |  |  
-| Payments | Store | Except for centralised payments | +| Store credentials | Store | Store |  |  
-| New users | Store | New user records sent to central server | +| Authorisers and authorisation | Store | Store |  |  
-| User licenses and existing users | Local | | +| Tenders and quotes | Store | Store | Except for centralised procurement  |  
-| User permissions | Local | | +| Purchase orders | Store | Store | Except for centralised procurement or supervisor-mode ordering |  
-| Preferences (non-store) | Local | Except for a few special cases which are explicitly synced | +| Payments | Store | Store | Except for centralised payments  |  
-Tenders and quotes | Local | | +| New users | Store | Store | New user records sent to central server |  
-| Incoterms and tender conditions | Local | | +| User licenses and existing users | Local | Local |  |  
-Reference documents | Local | | +| User permissions | Local | Local |  |  
-| HIS | Local | | +| Preferences (non-store) | Local | Local | Except for a few special cases which are explicitly synced |  
-| Drug registration | Local | | +Reference documents | Local | Local |  |  
-| Labels | Local | | +HIS | Local | Local |  |  
-| Logs | Local | | +| Drug registration | Local | Local |  |  
-| Reminders | Local | | +| Labels | Local | Local |  |  
-| Adverse drug reactions | Local | |+| Logs | Local | Local |  |  
 +| Reminders | Local | Local |  |  
 +| Adverse drug reactions | Local | Local                                                                                                  |  
 ==== Stores ==== ==== Stores ====
  
Line 392: Line 402:
  
 ===== How to tell if synchronisation is happening ===== ===== How to tell if synchronisation is happening =====
-Note: the synchronisation system can be disabled completely or paused in the preferences (see the [[preferences:general#synchronisation_section|16.01. General preferences]] page for details).+**Note:** the synchronisation system can be disabled completely or paused in the preferences (see the [[preferences:general#synchronisation_section|16.01. General preferences]] page for details).
 ==== The Manual Sync Button ==== ==== The Manual Sync Button ====
 {{:other_stuff:pasted:20200708-033640.png}} {{:other_stuff:pasted:20200708-033640.png}}
  • Last modified: 2023/01/27 12:47
  • by Gary Willetts