SlideShare a Scribd company logo
1 of 41
Download to read offline
MONTREAL JUNE 30, JULY 1ST AND 2ND 2012




Practical ERSync
David Aspinall
Global Village Consulting Inc.


                                        1
Outline

1 Sync Overview
2 Integrating with WebObjects
3 Integrating with iOS
4 Development Plan
                  2
Introduction


•   Who am I

    •   David Aspinall

    •   Developer / Consultant for Global Village Consulting Inc.




                                   3
Why ERSync?

•   Why not REST/SOAP/...

•   Framework to simplify data distribution to mobile apps

•   Contribute to the WOCommunity

•   Leverage for my clients and projects




                                 4
Objective-Sync
           Sync Objective

The goal is to make 2 disconnected sets of data
match
    .. as quickly as possible
    .. in a way the user expects


                         5
What is Sync




               6
What is that cloud?

Dropbox

iCloud           Miracles


            7
We are Wonder-ful
Design Objectives

•   Leverage our WO experience, products and services.

•   Minimally impact our existing code base.

    •   No server database changes in existing business system.

    •   No sprinkling of interfaces or special logic in current system

•   Simple client protocol and supporting library


                                 8
What is ERSync
         WO App
                  ERRest



        ?              ERSync




                           9
Integrating with WebObjects
•   Built on ERRest (routes, transport ...)

•   EOObjectStoreCoordinator.ObjectsChangedInStoreNotification

•   No model changes required in existing system

•   ERSync database can be different schema, host or database

•   All relevant data changes must notify the sync engine

     •   framework is linked in, turned on

     •   distributed change notification (ERChangeNotificationJMS)

                                   10
The Easy Part
    public class Application extends ERXApplication {
	   public static void main(String[] argv) {
	   	 ERXApplication.main(argv, Application.class);
	   }

	   public Application() {
	   	 ERXApplication.log.info("Welcome to " + name() + " !");
	   	 /* ** put your initialization code in here ** */
        ERXDatabaseContextMulticastingDelegate.addDefaultDelegate(new ERXEntityDependencyOrderingDelegate());

        ERXSyncHandler syncHandler = new ERXSyncHandler();
        syncHandler.setSyncAuthenticator(new SyncAuthenticationProvider());

        ERXSyncHandler.register(syncHandler);
	   }
}




                                                        11
What did that do?

•   ERXSyncHandler extends ERXRouteRequestHandler

    •   creates REST routes

    •   adds change notification observer

•   Sync Authenticator

    •   this is the gateway class between ERSync and your Application



                                  12
Sync Authenticator

•   authenticates a user by username and password

    •   does NOT implement authentication, it should call your logic

•   provides list of Sync’able Entity Names

•   provide all EOKeyGlobalID’s for a given user

•   basically CRUD processor



                                  13
Sync Authenticator
    public interface ERXSyncAuthenticator
{
    public ERXSyncUser userForCredentials(String nme,String pwd, EOEditingContext ec);

    public NSArray<String> syncEntityNames();

    public NSArray<EOKeyGlobalID> syncObjectsForEntityUser(String entityName,
              ERXSyncUser usr, EOEditingContext ec);

    public EOEnterpriseObject syncInsertObject(EOEditingContext editingContext,
              EOEntity eoEntity, NSDictionary dict, ERXSyncUser user);

    public void syncUpdateObject(EOEnterpriseObject eo,
              NSDictionary dict, ERXSyncUser user);

    public void syncDeleteObject(EOEnterpriseObject eo, ERXSyncUser user);

}
                                            14
ERSync tracking



               Token
ERSyncEntity     •Must be able to reconstruct the EO
                 •Cannot be a FK because we need to track deletes
    token        •Currently using
    status
                   •EntityName:pk[-pk*]
                   •Note:1000001
    uuid         •Planning to change it to URI
                   •ersync://EntityName/pk[/pk*]
 updatedDate       •ersync://Note/100001
                   •ersync://Compound/10001/4432
                         15
ERSync tracking




               Status
ERSyncEntity     V - Virgin - never by sync’d
    token        I - Inserted
                 U - Updated
    status       D - Deleted

    uuid
 updatedDate


                          16
ERSync tracking




ERSyncEntity   UUID
                • The Database agnostic, universally unique id
    token       • Clients will ALWAYS provide a UUID
    status
                   • usually the UUID assigned by the server
                   • where the client inserts, it assigns the
    uuid             UUID and leaves the token blank
                • Removes primary key distribution and
 updatedDate      collision problems


                         17
Change Notication Process

                                              ERSyncChangeValue   ERSyncChangeBoolean
ERSyncAuthRef        ERSyncChangeset                                  booleanValue
                                                  attibuteName
                                                    valueType     ERSyncChangeInteger
    token                  uuid                                         intValue
     uuid              updatedDate
    name                                                          ERSyncChangeString
                                                                      booleanValue

                                                                    ERSyncChange ..
      M-M                                                               Float ..
                                                                       Double ..
                                                                       BLOB ..
      ERSyncEntity
                                                                  ERSyncChangeToOne
          token                                                       toOneValue
          status
           uuid                             M-M                   ERSyncChangeToMany
       updatedDate

                                       18
ERSync API Security

ERSyncClientDeveloper    ERSyncClientApplication   ERSyncAuthRef

        disable                  disable                token
         name                     name                   uuid
         uuid                     uuid                  name




                                                   ERSyncPrincipal
ERSyncClientDevice
                                                      deviceUUID
      disable                                       principalUUID
       name                                          lastSyncDate
       uuid


                                     19
Integrating with iOS


•   Very similar to the WO approach

•   Built on GVC Open frameworks




                               20
The Easy Part
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
! [super application:application didFinishLaunchingWithOptions:launchOptions];

! [self setEngine:[[SyncEngine alloc]
! !    initWithEditingContext:[self managedObjectContext]]];

! [[self engine] addSupportedEntity:[Note entityName]];
! [[self engine] addSupportedEntity:[Category entityName]];

! [self setPrincipal:[SyncPrincipal
! ! ! pseudoSingletonInContext:[self managedObjectContext]];
    return YES;
}




                                                        21
What did that do?

•   SyncEngine is the client version of ERXSyncHandler

    •   adds change notification observer for main context

•   SyncPrincipal

    •   Core Data record to store configuration information.




                                  22
iOS Model
                SyncChangeset

                     uuid
                 updatedDate               SyncChangeValue
SyncPrincipal
                                             attibuteName
  username                                     valueType
  password                                        value
     site
                ERSyncEntity
principaluuid
  lastSync          token                    toOneValue
                    name
                    status           M-M     toManyValue
                     uuid
                 updatedDate
                                23
Client Process


1. Registration
2. Initial / Full / Slow Sync
3. Delta / Fast Sync




                                24
Client Process - Registration
•   Links the client application and device to a   <registration>
                                                     <appid>
    user on the server
                                                          5AC343C6-2C35-4BB0-9A00-CE2938A12260
•   must provide server assigned                        </appid>
                                                        <deviceType>
    •   application UUID                                  743E2D47-DDA4-4827-A164-0C61547CD4D5
                                                        </deviceType>
    •   device Type UUID                                <deviceUUID>
•   provide client assigned and locally stored            D9781163-2A97-4E90-B978-DE2B9F86A9D5
                                                     </deviceUUID>
    •   device UUID                                  <user>david</user>
                                                     <password>tester</password>
    •   user credentials                           </registration>


                                                   25
Client Process - Registration

                                                     <sync>
•   server response provides                           <principalUUID>
                                                          dce87db1-0e87-44b6-9680-19dcd672eadb
    •   principal UUID                                 </principalUUID>
                                                       <lastSync type = "datetime">
    •   last Sync date (only if previously sync’d)       2012-06-30T10:25:10Z
                                                       </lastSync>
                                                     </sync>




                                                     26
Client Process - Sync
                                         <sync>
                                           <principalUUID>
                                               dce87db1-0e87-44b6-9680-19dcd672eadb
                                             </principalUUID>
•   Client initiates communication           <lastSync>2012-06-30T09:39:11Z</lastSync>
    •   sends principal UUID and last Sync
                                             <data>
    •   data in the Insert / Update / Delete   <Note id="EA3E9977-8B58-40FE-85CF-4E4027723DF8"
                                                 status="update">
        order
                                                 <subject>My new subject</subject>
                                                 <category>
                                                    <Category id="Category:1000000" />
                                                 </category>
                                           ...

                                                 27
Client Process - Sync
                                       <sync>
                                         <principalUUID>
•
                                             dce87db1-0e87-44b6-9680-19dcd672eadb
    Server response                       </principalUUID>
                                          <lastSync>2012-06-30T09:55:11Z</lastSync>
    •   echo principal UUID

    •   provides new last Sync date          <data>
                                               <Reminder id="EA3E9977-8B58-40FE-85CF-4E4027723DF8"
    •   data in the Insert / Update / Delete     status="update">
                                                 <name>Get Siri off my back</name>
        order
                                                 <type>
                                                    <ReminderType id="ReminderType:active"/>
                                                 </type>
                                           ...

                                               28
We are Wonder-ful
Design Objectives

✓ Leverage our WO experience, products and services.
✓ Minimally impact our existing code base.
 ✓ No server database changes in existing business system.
 ✓ No sprinkling of interfaces or special logic in current
    system

✓     Simple client protocol and supporting library

                             29
Development Plan - WO


•   Add support for Additional Change Value Types

    •   float, double, char .. scalar types

    •   BLOB, CLOB, LOB .. SLOBs




                                     30
Development Plan - WO
•   Add support for Additional Change Value Types




•   Track the SyncEntity status per Principal

    •   a principal represents a client/device combo

    •   entity status can be different on each device



                                    31
Development Plan - WO
•   Add support for Additional Change Value Types

•   Track the Entity status per Principal


•   Purge Changesets once all Principals have sync’d

    •   if all the registered client/devices have the change then it is not
        needed

    •   new registrations will be ‘Virgin’ and require the current record
        anyway. (ERSync is not a History engine)

                                     32
Development Plan - WO
•   Add support for Additional Change Value Types

•   Track the Entity status per Principal

•   Purge Changesets once all Principals have sync’d


•   Make SyncEntity a composite of several EOEntity types

    •   Related but De-normalized data

    •   virtual entity for non-relational data (images/thumbnails)


                                    33
Development Plan - WO
• Add support for Additional Change Value Types
• Track the Entity status per Principal
• Purge Changesets once all Principals have sync’d
• Make SyncEntity a composite of several EOEntity types
• Allow the client to sync a subset of data
  • date range (example bank transactions in 30 day window)
  • data group (example Toronto address book as a window into a
     larger address book)

                              34
Development Plan - iOS

•   Clean up the iOS ERSync framework

    •   ARC and Block compatible

    •   ERBranding

    •   Sync related UI components?




                                   35
Development Plan - iOS
•   Clean up the iOS ERSync framework



•   ERSyncEngine

    •   Does not need to process anything until registration

    •   Manage operations automatically

    •   detect errors/resets from server and perform full sync cycle



                                   36
Development Plan - iOS
•   Clean up the iOS ERSync framework

•   ERSyncEngine



•   Multiple CoreData model migration
    1. merged models cannot be migrated automatically
    2. Individual Stores cannot be migrated automatically


                                  37
MONTREAL JUNE 30, JULY 1ST AND 2ND 2012




Q&A


                          38
Web Resources

•   Source is currently available at:
    https://github.com/davidAtGVC/RemoteSync


•   The iOS projects have submodule references for the GVC Open kits:
    https://github.com/davidAtGVC/GVCFoundation
    https://github.com/davidAtGVC/GVCUIKit
    https://github.com/davidAtGVC/GVCCoreData



                                        39
The sync process overview
           Start               No - Login              No
                                            Should          Should
                   Session
                                             Push            Pull



                   1  Yes




                   Negotiate
                                            2    Yes
                                                             3
                                                             Yes
                                                                     No




                                            Push             Pull
                    Mode




                                                            Stop
Source: Apple Sync Services Programming Guide
                                            40
Why is this important



• Data != Files
• Pass the TTC test

              41

More Related Content

What's hot

RESTful OSGi Web Applications Tutorial - Khawaja S Shams & Jeff Norris
RESTful OSGi Web Applications Tutorial - Khawaja S Shams & Jeff NorrisRESTful OSGi Web Applications Tutorial - Khawaja S Shams & Jeff Norris
RESTful OSGi Web Applications Tutorial - Khawaja S Shams & Jeff Norrismfrancis
 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules uploadRyan Cuprak
 
jsf2 Notes
jsf2 Notesjsf2 Notes
jsf2 NotesRajiv Gupta
 
Angular beans
Angular beansAngular beans
Angular beansBessem Hmidi
 
[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JSIvano Malavolta
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 updateJoshua Long
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentationsourabh aggarwal
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 UpdateRyan Cuprak
 
Gradle - Build System
Gradle - Build SystemGradle - Build System
Gradle - Build SystemJeevesh Pandey
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSShekhar Gulati
 
Scala play-framework
Scala play-frameworkScala play-framework
Scala play-frameworkAbdhesh Kumar
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with GradleRyan Cuprak
 
AAI 2236-Using the New Java Concurrency Utilities with IBM WebSphere
AAI 2236-Using the New Java Concurrency Utilities with IBM WebSphereAAI 2236-Using the New Java Concurrency Utilities with IBM WebSphere
AAI 2236-Using the New Java Concurrency Utilities with IBM WebSphereKevin Sutter
 
Spring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen HoellerSpring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen HoellerZeroTurnaround
 
Lecture 7 Web Services JAX-WS & JAX-RS
Lecture 7   Web Services JAX-WS & JAX-RSLecture 7   Web Services JAX-WS & JAX-RS
Lecture 7 Web Services JAX-WS & JAX-RSFahad Golra
 
DataFX - JavaOne 2013
DataFX - JavaOne 2013DataFX - JavaOne 2013
DataFX - JavaOne 2013Hendrik Ebbers
 

What's hot (20)

Java EE 8
Java EE 8Java EE 8
Java EE 8
 
RESTful OSGi Web Applications Tutorial - Khawaja S Shams & Jeff Norris
RESTful OSGi Web Applications Tutorial - Khawaja S Shams & Jeff NorrisRESTful OSGi Web Applications Tutorial - Khawaja S Shams & Jeff Norris
RESTful OSGi Web Applications Tutorial - Khawaja S Shams & Jeff Norris
 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules upload
 
jsf2 Notes
jsf2 Notesjsf2 Notes
jsf2 Notes
 
Angular beans
Angular beansAngular beans
Angular beans
 
[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 update
 
Mule 2.2.1-users-guide
Mule 2.2.1-users-guideMule 2.2.1-users-guide
Mule 2.2.1-users-guide
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentation
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 Update
 
Gradle - Build System
Gradle - Build SystemGradle - Build System
Gradle - Build System
 
Developing Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJSDeveloping Modern Java Web Applications with Java EE 7 and AngularJS
Developing Modern Java Web Applications with Java EE 7 and AngularJS
 
JavaCro'14 - Unit testing in AngularJS – Slaven Tomac
JavaCro'14 - Unit testing in AngularJS – Slaven TomacJavaCro'14 - Unit testing in AngularJS – Slaven Tomac
JavaCro'14 - Unit testing in AngularJS – Slaven Tomac
 
Scala play-framework
Scala play-frameworkScala play-framework
Scala play-framework
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
AAI 2236-Using the New Java Concurrency Utilities with IBM WebSphere
AAI 2236-Using the New Java Concurrency Utilities with IBM WebSphereAAI 2236-Using the New Java Concurrency Utilities with IBM WebSphere
AAI 2236-Using the New Java Concurrency Utilities with IBM WebSphere
 
Spring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen HoellerSpring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen Hoeller
 
Spring 4 Web App
Spring 4 Web AppSpring 4 Web App
Spring 4 Web App
 
Lecture 7 Web Services JAX-WS & JAX-RS
Lecture 7   Web Services JAX-WS & JAX-RSLecture 7   Web Services JAX-WS & JAX-RS
Lecture 7 Web Services JAX-WS & JAX-RS
 
DataFX - JavaOne 2013
DataFX - JavaOne 2013DataFX - JavaOne 2013
DataFX - JavaOne 2013
 

Similar to Practical ERSync

The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)jeffz
 
Concurrency and Thread-Safe Data Processing in Background Tasks
Concurrency and Thread-Safe Data Processing in Background TasksConcurrency and Thread-Safe Data Processing in Background Tasks
Concurrency and Thread-Safe Data Processing in Background TasksWO Community
 
AngularJS - TechTalk 3/2/2014
AngularJS - TechTalk 3/2/2014AngularJS - TechTalk 3/2/2014
AngularJS - TechTalk 3/2/2014Spyros Ioakeimidis
 
Persistent Session Storage
Persistent Session StoragePersistent Session Storage
Persistent Session StorageWO Community
 
zenject extenject-intro
zenject extenject-introzenject extenject-intro
zenject extenject-introRiver Wang
 
What is Serialization in Java? | Java Tutorial | Edureka
What is Serialization in Java? | Java Tutorial | EdurekaWhat is Serialization in Java? | Java Tutorial | Edureka
What is Serialization in Java? | Java Tutorial | EdurekaEdureka!
 
Transactional Memory for Smalltalk
Transactional Memory for SmalltalkTransactional Memory for Smalltalk
Transactional Memory for SmalltalkLukas Renggli
 
Enterprise Java Web Application Frameworks Sample Stack Implementation
Enterprise Java Web Application Frameworks   Sample Stack ImplementationEnterprise Java Web Application Frameworks   Sample Stack Implementation
Enterprise Java Web Application Frameworks Sample Stack ImplementationMert Çalışkan
 
Serializing EMF models with Xtext
Serializing EMF models with XtextSerializing EMF models with Xtext
Serializing EMF models with Xtextmeysholdt
 
iPhonical and model-driven software development for the iPhone
iPhonical and model-driven software development for the iPhoneiPhonical and model-driven software development for the iPhone
iPhonical and model-driven software development for the iPhoneHeiko Behrens
 
JHipster Beyond CRUD - JHipster Conf' 2019
JHipster Beyond CRUD - JHipster Conf' 2019JHipster Beyond CRUD - JHipster Conf' 2019
JHipster Beyond CRUD - JHipster Conf' 2019Intesys
 
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token TheftRussell Sanford
 
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token TheftRussell Sanford
 
React && React Native workshop
React && React Native workshopReact && React Native workshop
React && React Native workshopStacy Goh
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN StackTroy Miles
 
Microservices with containers in the cloud
Microservices with containers in the cloudMicroservices with containers in the cloud
Microservices with containers in the cloudEugene Fedorenko
 
Declarative UI on iOS without SwiftUI (中文)
Declarative UI on iOS without SwiftUI (中文)Declarative UI on iOS without SwiftUI (中文)
Declarative UI on iOS without SwiftUI (中文)Shih-Ting Huang
 
Hidden Treasures in Project Wonder
Hidden Treasures in Project WonderHidden Treasures in Project Wonder
Hidden Treasures in Project WonderWO Community
 
Using the latest Java Persistence API 2 Features - Tech Days 2010 India
Using the latest Java Persistence API 2 Features - Tech Days 2010 IndiaUsing the latest Java Persistence API 2 Features - Tech Days 2010 India
Using the latest Java Persistence API 2 Features - Tech Days 2010 IndiaArun Gupta
 
Hidden pearls for High-Performance-Persistence
Hidden pearls for High-Performance-PersistenceHidden pearls for High-Performance-Persistence
Hidden pearls for High-Performance-PersistenceSven Ruppert
 

Similar to Practical ERSync (20)

The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
 
Concurrency and Thread-Safe Data Processing in Background Tasks
Concurrency and Thread-Safe Data Processing in Background TasksConcurrency and Thread-Safe Data Processing in Background Tasks
Concurrency and Thread-Safe Data Processing in Background Tasks
 
AngularJS - TechTalk 3/2/2014
AngularJS - TechTalk 3/2/2014AngularJS - TechTalk 3/2/2014
AngularJS - TechTalk 3/2/2014
 
Persistent Session Storage
Persistent Session StoragePersistent Session Storage
Persistent Session Storage
 
zenject extenject-intro
zenject extenject-introzenject extenject-intro
zenject extenject-intro
 
What is Serialization in Java? | Java Tutorial | Edureka
What is Serialization in Java? | Java Tutorial | EdurekaWhat is Serialization in Java? | Java Tutorial | Edureka
What is Serialization in Java? | Java Tutorial | Edureka
 
Transactional Memory for Smalltalk
Transactional Memory for SmalltalkTransactional Memory for Smalltalk
Transactional Memory for Smalltalk
 
Enterprise Java Web Application Frameworks Sample Stack Implementation
Enterprise Java Web Application Frameworks   Sample Stack ImplementationEnterprise Java Web Application Frameworks   Sample Stack Implementation
Enterprise Java Web Application Frameworks Sample Stack Implementation
 
Serializing EMF models with Xtext
Serializing EMF models with XtextSerializing EMF models with Xtext
Serializing EMF models with Xtext
 
iPhonical and model-driven software development for the iPhone
iPhonical and model-driven software development for the iPhoneiPhonical and model-driven software development for the iPhone
iPhonical and model-driven software development for the iPhone
 
JHipster Beyond CRUD - JHipster Conf' 2019
JHipster Beyond CRUD - JHipster Conf' 2019JHipster Beyond CRUD - JHipster Conf' 2019
JHipster Beyond CRUD - JHipster Conf' 2019
 
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
0x02 - Windows Privilege Esc - A Low Level Explanation of Token Theft
 
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
0x002 - Windows Priv Esc - A Low Level Explanation of Token Theft
 
React && React Native workshop
React && React Native workshopReact && React Native workshop
React && React Native workshop
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
Microservices with containers in the cloud
Microservices with containers in the cloudMicroservices with containers in the cloud
Microservices with containers in the cloud
 
Declarative UI on iOS without SwiftUI (中文)
Declarative UI on iOS without SwiftUI (中文)Declarative UI on iOS without SwiftUI (中文)
Declarative UI on iOS without SwiftUI (中文)
 
Hidden Treasures in Project Wonder
Hidden Treasures in Project WonderHidden Treasures in Project Wonder
Hidden Treasures in Project Wonder
 
Using the latest Java Persistence API 2 Features - Tech Days 2010 India
Using the latest Java Persistence API 2 Features - Tech Days 2010 IndiaUsing the latest Java Persistence API 2 Features - Tech Days 2010 India
Using the latest Java Persistence API 2 Features - Tech Days 2010 India
 
Hidden pearls for High-Performance-Persistence
Hidden pearls for High-Performance-PersistenceHidden pearls for High-Performance-Persistence
Hidden pearls for High-Performance-Persistence
 

More from WO Community

KAAccessControl
KAAccessControlKAAccessControl
KAAccessControlWO Community
 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engineWO Community
 
Using Nagios to monitor your WO systems
Using Nagios to monitor your WO systemsUsing Nagios to monitor your WO systems
Using Nagios to monitor your WO systemsWO Community
 
Build and deployment
Build and deploymentBuild and deployment
Build and deploymentWO Community
 
High availability
High availabilityHigh availability
High availabilityWO Community
 
Reenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWSReenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWSWO Community
 
Chaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real WorldChaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real WorldWO Community
 
D2W Stateful Controllers
D2W Stateful ControllersD2W Stateful Controllers
D2W Stateful ControllersWO Community
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on WindowsWO Community
 
Unit Testing with WOUnit
Unit Testing with WOUnitUnit Testing with WOUnit
Unit Testing with WOUnitWO Community
 
Life outside WO
Life outside WOLife outside WO
Life outside WOWO Community
 
Advanced Apache Cayenne
Advanced Apache CayenneAdvanced Apache Cayenne
Advanced Apache CayenneWO Community
 
Migrating existing Projects to Wonder
Migrating existing Projects to WonderMigrating existing Projects to Wonder
Migrating existing Projects to WonderWO Community
 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative versionWO Community
 
iOS for ERREST
iOS for ERRESTiOS for ERREST
iOS for ERRESTWO Community
 
"Framework Principal" pattern
"Framework Principal" pattern"Framework Principal" pattern
"Framework Principal" patternWO Community
 
Filtering data with D2W
Filtering data with D2W Filtering data with D2W
Filtering data with D2W WO Community
 
Localizing your apps for multibyte languages
Localizing your apps for multibyte languagesLocalizing your apps for multibyte languages
Localizing your apps for multibyte languagesWO Community
 

More from WO Community (20)

KAAccessControl
KAAccessControlKAAccessControl
KAAccessControl
 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engine
 
Using Nagios to monitor your WO systems
Using Nagios to monitor your WO systemsUsing Nagios to monitor your WO systems
Using Nagios to monitor your WO systems
 
Build and deployment
Build and deploymentBuild and deployment
Build and deployment
 
High availability
High availabilityHigh availability
High availability
 
Reenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWSReenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWS
 
Chaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real WorldChaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real World
 
D2W Stateful Controllers
D2W Stateful ControllersD2W Stateful Controllers
D2W Stateful Controllers
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on Windows
 
Unit Testing with WOUnit
Unit Testing with WOUnitUnit Testing with WOUnit
Unit Testing with WOUnit
 
Life outside WO
Life outside WOLife outside WO
Life outside WO
 
Advanced Apache Cayenne
Advanced Apache CayenneAdvanced Apache Cayenne
Advanced Apache Cayenne
 
Migrating existing Projects to Wonder
Migrating existing Projects to WonderMigrating existing Projects to Wonder
Migrating existing Projects to Wonder
 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative version
 
iOS for ERREST
iOS for ERRESTiOS for ERREST
iOS for ERREST
 
"Framework Principal" pattern
"Framework Principal" pattern"Framework Principal" pattern
"Framework Principal" pattern
 
Filtering data with D2W
Filtering data with D2W Filtering data with D2W
Filtering data with D2W
 
WOver
WOverWOver
WOver
 
Localizing your apps for multibyte languages
Localizing your apps for multibyte languagesLocalizing your apps for multibyte languages
Localizing your apps for multibyte languages
 
WOdka
WOdkaWOdka
WOdka
 

Recently uploaded

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Recently uploaded (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Practical ERSync

  • 1. MONTREAL JUNE 30, JULY 1ST AND 2ND 2012 Practical ERSync David Aspinall Global Village Consulting Inc. 1
  • 2. Outline 1 Sync Overview 2 Integrating with WebObjects 3 Integrating with iOS 4 Development Plan 2
  • 3. Introduction • Who am I • David Aspinall • Developer / Consultant for Global Village Consulting Inc. 3
  • 4. Why ERSync? • Why not REST/SOAP/... • Framework to simplify data distribution to mobile apps • Contribute to the WOCommunity • Leverage for my clients and projects 4
  • 5. Objective-Sync Sync Objective The goal is to make 2 disconnected sets of data match .. as quickly as possible .. in a way the user expects 5
  • 7. What is that cloud? Dropbox iCloud Miracles 7
  • 8. We are Wonder-ful Design Objectives • Leverage our WO experience, products and services. • Minimally impact our existing code base. • No server database changes in existing business system. • No sprinkling of interfaces or special logic in current system • Simple client protocol and supporting library 8
  • 9. What is ERSync WO App ERRest ? ERSync 9
  • 10. Integrating with WebObjects • Built on ERRest (routes, transport ...) • EOObjectStoreCoordinator.ObjectsChangedInStoreNotication • No model changes required in existing system • ERSync database can be different schema, host or database • All relevant data changes must notify the sync engine • framework is linked in, turned on • distributed change notication (ERChangeNoticationJMS) 10
  • 11. The Easy Part public class Application extends ERXApplication { public static void main(String[] argv) { ERXApplication.main(argv, Application.class); } public Application() { ERXApplication.log.info("Welcome to " + name() + " !"); /* ** put your initialization code in here ** */ ERXDatabaseContextMulticastingDelegate.addDefaultDelegate(new ERXEntityDependencyOrderingDelegate()); ERXSyncHandler syncHandler = new ERXSyncHandler(); syncHandler.setSyncAuthenticator(new SyncAuthenticationProvider()); ERXSyncHandler.register(syncHandler); } } 11
  • 12. What did that do? • ERXSyncHandler extends ERXRouteRequestHandler • creates REST routes • adds change notication observer • Sync Authenticator • this is the gateway class between ERSync and your Application 12
  • 13. Sync Authenticator • authenticates a user by username and password • does NOT implement authentication, it should call your logic • provides list of Sync’able Entity Names • provide all EOKeyGlobalID’s for a given user • basically CRUD processor 13
  • 14. Sync Authenticator public interface ERXSyncAuthenticator { public ERXSyncUser userForCredentials(String nme,String pwd, EOEditingContext ec); public NSArray<String> syncEntityNames(); public NSArray<EOKeyGlobalID> syncObjectsForEntityUser(String entityName, ERXSyncUser usr, EOEditingContext ec); public EOEnterpriseObject syncInsertObject(EOEditingContext editingContext, EOEntity eoEntity, NSDictionary dict, ERXSyncUser user); public void syncUpdateObject(EOEnterpriseObject eo, NSDictionary dict, ERXSyncUser user); public void syncDeleteObject(EOEnterpriseObject eo, ERXSyncUser user); } 14
  • 15. ERSync tracking Token ERSyncEntity •Must be able to reconstruct the EO •Cannot be a FK because we need to track deletes token •Currently using status •EntityName:pk[-pk*] •Note:1000001 uuid •Planning to change it to URI •ersync://EntityName/pk[/pk*] updatedDate •ersync://Note/100001 •ersync://Compound/10001/4432 15
  • 16. ERSync tracking Status ERSyncEntity V - Virgin - never by sync’d token I - Inserted U - Updated status D - Deleted uuid updatedDate 16
  • 17. ERSync tracking ERSyncEntity UUID • The Database agnostic, universally unique id token • Clients will ALWAYS provide a UUID status • usually the UUID assigned by the server • where the client inserts, it assigns the uuid UUID and leaves the token blank • Removes primary key distribution and updatedDate collision problems 17
  • 18. Change Notication Process ERSyncChangeValue ERSyncChangeBoolean ERSyncAuthRef ERSyncChangeset booleanValue attibuteName valueType ERSyncChangeInteger token uuid intValue uuid updatedDate name ERSyncChangeString booleanValue ERSyncChange .. M-M Float .. Double .. BLOB .. ERSyncEntity ERSyncChangeToOne token toOneValue status uuid M-M ERSyncChangeToMany updatedDate 18
  • 19. ERSync API Security ERSyncClientDeveloper ERSyncClientApplication ERSyncAuthRef disable disable token name name uuid uuid uuid name ERSyncPrincipal ERSyncClientDevice deviceUUID disable principalUUID name lastSyncDate uuid 19
  • 20. Integrating with iOS • Very similar to the WO approach • Built on GVC Open frameworks 20
  • 21. The Easy Part - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ! [super application:application didFinishLaunchingWithOptions:launchOptions]; ! [self setEngine:[[SyncEngine alloc] ! ! initWithEditingContext:[self managedObjectContext]]]; ! [[self engine] addSupportedEntity:[Note entityName]]; ! [[self engine] addSupportedEntity:[Category entityName]]; ! [self setPrincipal:[SyncPrincipal ! ! ! pseudoSingletonInContext:[self managedObjectContext]]; return YES; } 21
  • 22. What did that do? • SyncEngine is the client version of ERXSyncHandler • adds change notication observer for main context • SyncPrincipal • Core Data record to store conguration information. 22
  • 23. iOS Model SyncChangeset uuid updatedDate SyncChangeValue SyncPrincipal attibuteName username valueType password value site ERSyncEntity principaluuid lastSync token toOneValue name status M-M toManyValue uuid updatedDate 23
  • 24. Client Process 1. Registration 2. Initial / Full / Slow Sync 3. Delta / Fast Sync 24
  • 25. Client Process - Registration • Links the client application and device to a <registration> <appid> user on the server 5AC343C6-2C35-4BB0-9A00-CE2938A12260 • must provide server assigned </appid> <deviceType> • application UUID 743E2D47-DDA4-4827-A164-0C61547CD4D5 </deviceType> • device Type UUID <deviceUUID> • provide client assigned and locally stored D9781163-2A97-4E90-B978-DE2B9F86A9D5 </deviceUUID> • device UUID <user>david</user> <password>tester</password> • user credentials </registration> 25
  • 26. Client Process - Registration <sync> • server response provides <principalUUID> dce87db1-0e87-44b6-9680-19dcd672eadb • principal UUID </principalUUID> <lastSync type = "datetime"> • last Sync date (only if previously sync’d) 2012-06-30T10:25:10Z </lastSync> </sync> 26
  • 27. Client Process - Sync <sync> <principalUUID> dce87db1-0e87-44b6-9680-19dcd672eadb </principalUUID> • Client initiates communication <lastSync>2012-06-30T09:39:11Z</lastSync> • sends principal UUID and last Sync <data> • data in the Insert / Update / Delete <Note id="EA3E9977-8B58-40FE-85CF-4E4027723DF8" status="update"> order <subject>My new subject</subject> <category> <Category id="Category:1000000" /> </category> ... 27
  • 28. Client Process - Sync <sync> <principalUUID> • dce87db1-0e87-44b6-9680-19dcd672eadb Server response </principalUUID> <lastSync>2012-06-30T09:55:11Z</lastSync> • echo principal UUID • provides new last Sync date <data> <Reminder id="EA3E9977-8B58-40FE-85CF-4E4027723DF8" • data in the Insert / Update / Delete status="update"> <name>Get Siri off my back</name> order <type> <ReminderType id="ReminderType:active"/> </type> ... 28
  • 29. We are Wonder-ful Design Objectives ✓ Leverage our WO experience, products and services. ✓ Minimally impact our existing code base. ✓ No server database changes in existing business system. ✓ No sprinkling of interfaces or special logic in current system ✓ Simple client protocol and supporting library 29
  • 30. Development Plan - WO • Add support for Additional Change Value Types • float, double, char .. scalar types • BLOB, CLOB, LOB .. SLOBs 30
  • 31. Development Plan - WO • Add support for Additional Change Value Types • Track the SyncEntity status per Principal • a principal represents a client/device combo • entity status can be different on each device 31
  • 32. Development Plan - WO • Add support for Additional Change Value Types • Track the Entity status per Principal • Purge Changesets once all Principals have sync’d • if all the registered client/devices have the change then it is not needed • new registrations will be ‘Virgin’ and require the current record anyway. (ERSync is not a History engine) 32
  • 33. Development Plan - WO • Add support for Additional Change Value Types • Track the Entity status per Principal • Purge Changesets once all Principals have sync’d • Make SyncEntity a composite of several EOEntity types • Related but De-normalized data • virtual entity for non-relational data (images/thumbnails) 33
  • 34. Development Plan - WO • Add support for Additional Change Value Types • Track the Entity status per Principal • Purge Changesets once all Principals have sync’d • Make SyncEntity a composite of several EOEntity types • Allow the client to sync a subset of data • date range (example bank transactions in 30 day window) • data group (example Toronto address book as a window into a larger address book) 34
  • 35. Development Plan - iOS • Clean up the iOS ERSync framework • ARC and Block compatible • ERBranding • Sync related UI components? 35
  • 36. Development Plan - iOS • Clean up the iOS ERSync framework • ERSyncEngine • Does not need to process anything until registration • Manage operations automatically • detect errors/resets from server and perform full sync cycle 36
  • 37. Development Plan - iOS • Clean up the iOS ERSync framework • ERSyncEngine • Multiple CoreData model migration 1. merged models cannot be migrated automatically 2. Individual Stores cannot be migrated automatically 37
  • 38. MONTREAL JUNE 30, JULY 1ST AND 2ND 2012 Q&A 38
  • 39. Web Resources • Source is currently available at: https://github.com/davidAtGVC/RemoteSync • The iOS projects have submodule references for the GVC Open kits: https://github.com/davidAtGVC/GVCFoundation https://github.com/davidAtGVC/GVCUIKit https://github.com/davidAtGVC/GVCCoreData 39
  • 40. The sync process overview Start No - Login No Should Should Session Push Pull 1 Yes Negotiate 2 Yes 3 Yes No Push Pull Mode Stop Source: Apple Sync Services Programming Guide 40
  • 41. Why is this important • Data != Files • Pass the TTC test 41