OPENMRS DATA SYNCHRONIZATION IMPLEMENTING OPENMRS IN LOOSELY CONNECTED ENVIRONMENTS 27-Nov-2008, Maros Cunderlik, openmrs.org 1.

Slides:



Advertisements
Similar presentations
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed System Architectures.
Advertisements

OVERVIEW TEAM5 SOFTWARE The TEAM5 software manages personnel and test data for personal ESD grounding devices. Test and personnel data may be viewed/reported.
Chapter 19: Network Management Business Data Communications, 5e.
CSCI 465 D ata Communications and Networks Lecture 20 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Mecanismos de alta disponibilidad con Microsoft SQL Server 2008 Por: ISC Lenin López Fernández de Lara.
WSUS Presented by: Nada Abdullah Ahmed.
Spring, Hibernate and Web Services 13 th September 2014.
Prentice Hall, Database Systems Week 1 Introduction By Zekrullah Popal.
Chapter 19: Network Management Business Data Communications, 4e.
Business Continuity and DR, A Practical Implementation Mich Talebzadeh, Consultant, Deutsche Bank
Notes to the presenter. I would like to thank Jim Waldo, Jon Bostrom, and Dennis Govoni. They helped me put this presentation together for the field.
1 ITC242 – Introduction to Data Communications Week 12 Topic 18 Chapter 19 Network Management.
1 Introduction The Database Environment. 2 Web Links Google General Database Search Database News Access Forums Google Database Books O’Reilly Books Oracle.
© 2005, Cornell University. Rapid Application Development using the Kuali Architecture (Struts, Spring and OJB) A Case Study Bryan Hutchinson
Hands-On Microsoft Windows Server 2003 Networking Chapter 7 Windows Internet Naming Service.
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen - Bolzano Lesson 2 – Components.
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
DAKNET Presented By: rreema.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
VTS INNOVATOR SERIES Real Problems, Real solutions.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Session-01. Hibernate Framework ? Why we use Hibernate ?
Overview SAP Basis Functions. SAP Technical Overview Learning Objectives What the Basis system is How does SAP handle a transaction request Differentiating.
Protocols and the TCP/IP Suite Chapter 4. Multilayer communication. A series of layers, each built upon the one below it. The purpose of each layer is.
Data Communications and Networks
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 IT Essentials PC Hardware and Software 4.1 Instructional Resource Chapter.
LAN Overview (part 2) CSE 3213 Fall April 2017.
1 DATABASE TECHNOLOGIES BUS Abdou Illia, Fall 2007 (Week 3, Tuesday 9/4/2007)
Peter Hinrichsen TechInsite Pty Ltd Rolling your own Object Persistence Framework (OPF) Please consider the following questions:
Data Management Kelly Clynes Caitlin Minteer. Agenda Globus Toolkit Basic Data Management Systems Overview of Data Management Data Movement Grid FTP Reliable.
Entity Beans BMP Celsina Bignoli
Lec4: TCP/IP, Network management model, Agent architectures
Chapter 7 Low-Level Protocols
Windows 2000 Operating System -- Active Directory Service COSC 516 Yuan YAO 08/29/2000.
Chapter 13 Users, Groups Profiles and Policies. Learning Objectives Understand Windows XP Professional user accounts Understand the different types of.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
© Wiley Inc All Rights Reserved. MCSE: Windows Server 2003 Active Directory Planning, Implementation, and Maintenance Study Guide, Second Edition.
07/09/04 Johan Muskens ( TU/e Computer Science, System Architecture and Networking.
NT SECURITY Introduction Security features of an operating system revolve around the principles of “Availability,” “Integrity,” and Confidentiality. For.
OSIsoft High Availability PI Replication
BZUPAGES.COM Presentation on TCP/IP Presented to: Sir Taimoor Presented by: Jamila BB Roll no Nudrat Rehman Roll no
Client/Server Model: A Business View The different Client/server implementations differ according to: 1.Where the processing for the presentation of information.
Department of Industrial Engineering Sharif University of Technology Session# 10.
Introduction to Grids By: Fetahi Z. Wuhib [CSD2004-Team19]
Kemal Baykal Rasim Ismayilov
TSS Database Inventory. CIRA has… Received and imported the 2002 and 2018 modeling data Decided to initially store only IMPROVE site-specific data Decided.
ATLAS Database Access Library Local Area LCG3D Meeting Fermilab, Batavia, USA October 21, 2004 Alexandre Vaniachine (ANL)
1 Transport Layer: Basics Outline Intro to transport UDP Congestion control basics.
TOPSpro Special Topics I: Database Managemen t. Agenda for Module I: Database Management  TOPSpro Backup/Restore Wizard  TOPS-TOPS Import/Export Wizard.
Building Preservation Environments with Data Grid Technology Reagan W. Moore Presenter: Praveen Namburi.
E-commerce Architecture Ayşe Başar Bener. Client Server Architecture E-commerce is based on client/ server architecture –Client processes requesting service.
COMP1321 Digital Infrastructure Richard Henson March 2016.
XML and Distributed Applications By Quddus Chong Presentation for CS551 – Fall 2001.
Cofax Scalability Document Version Scaling Cofax in General The scalability of Cofax is directly related to the system software, hardware and network.
Amazon Web Services. Amazon Web Services (AWS) - robust, scalable and affordable infrastructure for cloud computing. This session is about:
OSIsoft High Availability PI Replication Colin Breck, PI Server Team Dave Oda, PI SDK Team.
Novell iFolder Novell Academy QuickTrain. What is iFolder? Novell iFolder lets users’ files follow them anywhere A simple and secure way to access, organize.
Chapter 19: Network Management
Chapter 6 Application Hardening
Implementing RPC by Birrell & Nelson
CHAPTER 3 Architectures for Distributed Systems
Introduction of Week 6 Assignment Discussion
File Transfer Issues with TCP Acceleration with FileCatalyst
Setup Sqoop.
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
PerformanceBridge Application Suite and Practice 2.0 IT Specifications
Sending data to EUROSTAT using STATEL and STADIUM web client
Presentation transcript:

OPENMRS DATA SYNCHRONIZATION IMPLEMENTING OPENMRS IN LOOSELY CONNECTED ENVIRONMENTS 27-Nov-2008, Maros Cunderlik, openmrs.org 1

OpenMRS Software Architecture  Software Architecture  “Architecture is defined by the recommended practice as the fundamental organization of a system, embodied in its components, their relationships to each other and the environment, and the principles governing its design and evolution” WHAT does it do? HOW does it do it? WHY does it do it the way it does?  Architecture Documentation: ‘Views’  Logical: documents functional composition of the system elements and their relationships  Physical: distribution of the logical units onto physical resources Servers, technologies, protocols, ports, etc. 2 References:

OpenMRS : Logical View 3

OpenMRS: Physical View MySql DB Tomcat + Spring + Hibernate (Http + Java Application Server + Java Persistence) JDBC Internet (HTTP) Internet (HTTP) Data Entry Clinical Decision Support Reporting 4

OpenMRS: Challenges in rural areas  Goals:  Allow convenient and up-to-date access to system in rural districts and health centers  Data collected in rural areas must be available to central systems in timely manner  Challenges?  Power  Connectivity (packet loss, corruption) and bandwidth  Travel: data cannot be easily shipped to/from central locations  HW and SW maintenance and upgrades in remote areas HW failures, patches, SW upgrades, etc. 5

OpenMRS: Loosely connected  Solutions?  #1: Collect Data on paper and ship it back to central location Pros vs. Cons ?  #2: OpenMRS ‘Lite’ Make light-weight copy of openmrs that support minimal functionality and distribute it to remote areas Pros vs. Cons ?  #3: Separate Desktop Application Make completely separate application that works in disconnected mode Pros vs. Cons ?  #4: Connected installs of OpenMRS with data synchronization Pros vs. Cons ? 6

OpenMRS: #4 Data Synchronization  Reasons for #4:  Health centers need functionality beyond simple data entry (i.e. reporting, updated drug information); i.e. making separate application would be costly  Health centers also need to *receive* data about patients from other centers in their district/province: i.e. ‘one-way’ data flow is not sufficient  On-site connectivity: there *will* be onsite Internet connectivity; it may be sporadic and at times unreliable  Given limited amount of dev resources, reuse as much of core openmrs java code as possible 7

OpenMRS: Data Synchronization Design  Q: What capabilities must exist in a system for two installations to exchange data?  A: Four things  1. Serialization Facility to reliably export and then import business objects  2. Globally Unique Identification of data/records Primary keys are unique only to a single *local* database  3. Change tracking mechanism How do we know what changed on a given system since ‘last time’?  4. Transport mechanism capable of working on unreliable networks 8

 #1: Serialization: Serializing object graphs can be tricky Data Synchronization: Implementation public class Person { protected Address primaryAddress; protected Address secondaryAddress; … public Address getPrimaryAddress() {..} public void setPrimaryAddress(Address a) {..} public Address getSecondaryAddress() {..} public void setSecondaryAddress(Address a) {..} } public static void main(String [ ] args) { Address a = new Address(“Kigali”); Person p = new Person(); p.setPrimaryAddress(a); p.setSecondaryAddress(a); a.setValue(“Kirehe”); assert(p.getPrimaryAddress().equals(p.getS econdaryAddress()); }.. Address a1 = p.getPrimaryAddress(); Address a2 = p.getSecondaryAddress(); a1.setValue(“Rwinkwavu”): assert(a1.equals(a2));.. Address a1 = p.getPrimaryAddress(); Address a2 = p.getSecondaryAddress(); a1.setValue(“Rwinkwavu”): assert(a1.equals(a2)); 9

 Serialization Options:  Java native: java.io.Serializable doesn’t work well for durable state; cannot move from one JVM to another  3 rd party tools: Simple, XStream  Custom i.e. implement iava.io.Externalizable  Data Synchronization: leverage Hibernate Persistence Mechanism  Pros: Reuse what is already in use in openmrs Also provides simple solution to #3 problem  Dependent on persistence layer: any changes made outside of it will not be serialized or understood  Longer-term: replace with rebust serialization framework in core openmrs Data Synchronization: Implementation 10

 #2: Record Uniqueness  How do we know patient_id of a given patient in two different databases?  Example: 2 server: Rwinkwavu and Kirehe 0. both Rwink and Kirehe have exact same # of patients in their tables 1. Rwink: Add patient Joe, system assigns next id, assume patient_id = 34; 2. Kirehe: Add patient Patrick, system assigns next available primary key, say 34; 3. If Rwink sends its patient data, patient #34 will be Joe but Kirehe ‘thinks’ it is Patrick: how to fix???  Two common solutions: Create mapping tables: server_id, table_id, pk Cons: using one central mapping table creates single point of failure, keeping up distributed version of the mapping table is trickly Use something that *is* globally unique: Universally Unique IDentifier (UUID) Java.util.UUID, Data Synchronization: Implementation 11

 #3: Change tracking mechanism  Servers need to somehow ‘tell’ each other the last time they ‘saw’ each other  Classic problem in distributed computing  Two (at least) common solutions: #1: Versioning #2: Change logs/journals  Openmrs sync: Change journal + hibernate intercetor (for now) We actually want versioning but doing so requires extensive changes to data model; compromise: change journal table analogous to DB transaction log Data Synchronization: Implementation 12

 #4: Robust Transport  Needs: cannot be connected protocol (i.e. RPC) Efficient on wire Back up mode for transport needs to be available in case of not connectivity Able to withstand network transport corruption  OpenMRS Sync solution: HTTP + checksum + compression ‘USB’ flat file based data interchange as backup Data Synchronization: Implementation 13

 Addressing the Challenges  Power and maintenance Use Ubuntu to minimize need for patches Application will automatically start up when server boots up and sync on schedule; no intervention needed Investment in key infrastructure: solar power, sat. connections TODOs: application self-update, database self-migrate  Connectivity, Travel Sync transmissions checksum-ed and compressed Data can be retransmitted without concern about corruption/duplication If prolonged outage: sync-via-USB available Data Synchronization: Implementation 14

 DEMO Data Synchronization: Implementation 15

Data Synchronization: Vision 16