Presentation is loading. Please wait.

Presentation is loading. Please wait.

EM 404 New MobiLink Technology Jim Graham Director of Engineering iAnywhere Solutions

Similar presentations


Presentation on theme: "EM 404 New MobiLink Technology Jim Graham Director of Engineering iAnywhere Solutions"— Presentation transcript:

1 EM 404 New MobiLink Technology Jim Graham Director of Engineering iAnywhere Solutions jim.graham@ianywhere.com

2 Outline Quick MobiLink review 8.0 New feature highlights MobiLink futures

3 MobiLink

4 MobiLink Design Goals Heterogeneous consolidated database Scalable and robust (tens of thousands) Manageable in large deployments Support handheld and wireless devices Flexible

5 How Synchronization Works 1. Upload ASA or UltraLite keep track of all changes since previous synchronization All changes are sent in a single upload stream MobiLink applies changes in a single transaction 2. Download Scripts in the consolidated database determine changes that need to be downloaded All changes are sent in a single download stream 3. Acknowledge download

6 MobiLink Synchronization

7 MobiLink Scripts begin_connection for each synchronization: begin_synchronization receive and apply upload stream prepare and send download stream end_synchronization end_connection Scripts define actions performed at the consolidated database at each stage or event during synchronization

8 8.0 New Feature Highlights Last download timestamp Statement-based uploads Java synchronization logic Better remote ASA terminology Selective uploads (priority synchronization) Improved reporting

9 7.0 Download Cursor The download_cursor script is used to insert or update rows in the remote database SELECT emp_id, emp_fname, emp_lname FROM employee WHERE last_modified > @LastDownload The download_deletes_cursor script is used to delete rows from the remote database SELECT emp_id FROM employee WHERE last_modified > @LastDownload AND status = ‘INACTIVE’

10 8.0 Last Download Timestamp The download_cursor script is used to insert or update rows in the remote database SELECT emp_id, emp_fname, emp_lname FROM employee WHERE last_modified > ? The download_deletes_cursor script is used to delete rows from the remote database SELECT emp_id FROM employee WHERE last_modified > ? AND status = ‘INACTIVE’

11 Last Download Benefits Last download time automatically stored in remote ASA or UltraLite database and provided to scripts during subsequent upload Less reliance on RDBMS functionality Performance Usability No longer need download ack Immediate commit of download transaction

12 8.0 New Feature Highlights Last download timestamp Statement-based uploads Java synchronization logic Better remote ASA terminology Selective uploads (priority synchronization) Improved reporting

13 The upload_cursor Script The upload_cursor script is used to insert, update, or delete rows in the consolidated database This is the primary script for uploading changes Example: SELECT emp_id, emp_fname, emp_lname FROM employee WHERE emp_id = ?

14 Statement-based Upload Scripts The upload_insert script is used to insert rows DELETE FROM employee WHERE emp_id = ? INSERT INTO employee (emp_id, emp_fname, emp_lname) VALUES ( ?, ?, ? ) The upload_update script is used to update rows UPDATE employee SET emp_fname = ?, emp_lname = ? WHERE emp_id = ? The upload_delete script is used to delete rows

15 Statement-based Conflicts The upload_fetch cursor for conflict detection The insert_old_row script is used to insert the row from the remote database before the update The insert_new_row script is used to insert the row from the remote database after the update The resolve_conflict script is used to resolve the conflict

16 Statement-based Benefits More understandable Array operations improve performance Single statement with multiple parameter sets Stronger ODBC support

17 8.0 New Feature Highlights Last download timestamp Statement-based uploads Java synchronization logic Better remote ASA terminology Selective uploads (priority synchronization) Improved reporting

18 Java Synchronization Logic Synchronization scripts written in Java rather than the native language of the consolidated database Single Java class defines the synchronization logic for a complete synchronization One public method for each event (Java method replaces SQL script) Java methods are passed the same parameters as SQL scripts (table, user, last download) Different classes can be used for different versions

19 Java Synchronization Logic

20 Java Details MobiLink Java API support classes Write your Java class and compile it Make your Java class available to MobiLink MobiLink runs Java synchronization logic in the standard Sun VM (JRE 1.3 installed) One instance of your class is instantiated for each MobiLink connection to the consolidated database One public method of your class is called for each event in the synchronization process Methods can return SQL strings

21 Java Example public class SalesSync { private DBConnectionContect _cc; public SalesSync( DBConnectionContext cc ) { _cc = cc; } public String EmpDownload( String user, Timestamp ts ) { String sql = “SELECT emp_id, emp_fname, emp_lname ” + “FROM employee WHERE last_modified >= ‘” + ts + “’”; return sql; }

22 Java Example javac -classpath c:\sa\java\mlscript.jar;.; Sales.java call ml_add_java_table_script( “Sales 1.0”, “employee”, “download_cursor”, “SalesSync.EmpDownload” ) dbmlsrv8 -c “dsn=cons” -o out.txt -sl java {-classpath.;}

23 Java Flexibility MobiLink JDBC bridge allows access to the database connection MobiLink is using to synchronize data Ability to create additional connections to the consolidated database or to another database Java instance variables share data across events Java static variables share data across connections java.lang.system.out.println to MobiLink output log Full power of standard Java VM Can mix Java and SQL synchronization logic

24 Java Benefits Works around limitations in native procedural languages of RDBMS Allows synchronization logic to be more portable across multiple RDBMS products Well known mainstream language that is well suited to procedural logic Re-use business logic Better debugging tools available

25 8.0 New Feature Highlights Last download timestamp Statement-based uploads Java synchronization logic Better remote ASA terminology Selective uploads (priority synchronization) Improved reporting

26 7.0 ASA Client Terminology Reference database Synchronization template Synchronization site mlxtract.exe Synchronization definition

27 8.0 ASA Client Terminology Publication Synchronization user Synchronization subscription CREATE PUBLICATION SalesSync ( TABLE employee ); CREATE SYNCHRONIZATION USER sally TYPE ‘tcpip’ ADDRESS ‘host=SalesServer’; CREATE SYNCHRONIZATION SUBSCRIPTION TO SalesSync FOR sally;

28 New Terminology Benefits Simpler, easier to understand Closer to SQL Remote Groundwork for other new features Multiple publications and subscriptions per user Selective uploads Use MobiLink to populate data Still a bit backwards

29 8.0 New Feature Highlights Last download timestamp Statement-based uploads Java synchronization logic Better remote ASA terminology Selective uploads (priority synchronization) Improved reporting

30 Selective Upload Multiple publications and subscriptions Publications can overlap ASA or UltraLite can synchronize one or more publications at the same time Articles in publications can identify a subset of the rows in a table using a WHERE clause ASA publications can identify a subset of the columns in tables (all publications must have same column list) UltraLite does not support column subsets

31 High Priority Synchronization CREATE PUBLICATION SalesSyncHigh ( TABLE “order” WHERE priority = ‘high’, TABLE order_item i WHERE ‘high’ = (SELECT priority FROM “order” o WHERE o.id = i.id ) ); CREATE PUBLICATION SalesSync ( TABLE employee, TABLE “order”, TABLE order_item );

32 Selective Upload Scenarios High priority wireless synchronization with lower priority cradle or LAN synchronization Nightly synchronization with more frequent synchronization throughout the day Request-based downloads Multiple applications using a common database

33 Selective Upload & Last Download Downloads have always been selective Separate last download timestamp kept for each publication in remote database Each synchronization, MobiLink uses the earliest last download time for all publications being synchronized Could mean redundant download

34 8.0 New Feature Highlights Last download timestamp Statement-based uploads Java synchronization logic Better remote ASA terminology Selective uploads (priority synchronization) Improved reporting

35 Improved Reporting New statistics events to record upload and download statistics (rows, errors, warnings, bytes) Upload dbmlsync output log following an error More detailed information following an error

36 More 8.0 New Features Automatic script generation sa_migrate Limit worker threads applying upload streams Database connection timeout

37 MobiLink Futures Message-based communication Java synchronization logic to non-relational enterprise application servers MobiLink monitor console

38 Resources Available Other TechWave sessions MySybase: Mobile & Wireless Developer newsgroups, white papers, technotes, FAQs samples, patches Award winning technical support Training and assistance during the initial phases of your synchronization projects

39 iAnywhere Solutions Highlights Ask the Experts - about Mobile & Wireless Solutions - Mezzanine Level Room 15B Mon./Tues. 11:30 am - 3:30 pm; Wed. 11:30 - 1:30; Thurs. 9 am - 12 noon -Exhibit Hall - Demo Center (truck) exhibit hall hours SIG (Special Interest Group) - Tuesday 5:30pm Mobile & Wireless SDCC, Upper level, Room 11 Keynote - Enabling m-Business Solutions Wednesday 1:30 pm - 3:00 pm iAnywhere Solutions Developer Community - Excellent resource for commonly asked questions, newsgroups, bug fixes, newsletters, event listings - visit www.ianywhere.com/developer


Download ppt "EM 404 New MobiLink Technology Jim Graham Director of Engineering iAnywhere Solutions"

Similar presentations


Ads by Google