• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Sybase Unwired Platform- Building Synchronized Mobile Apps
 

Sybase Unwired Platform- Building Synchronized Mobile Apps

on

  • 2,598 views

 

Statistics

Views

Total Views
2,598
Views on SlideShare
2,598
Embed Views
0

Actions

Likes
4
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Sybase Unwired Platform- Building Synchronized Mobile Apps Sybase Unwired Platform- Building Synchronized Mobile Apps Presentation Transcript

    • Building Synchronized Mobile Apps with SybaseUnwired PlatformPatrick Kelleher, Boris Magocsi, Charu Agarwal SAP RIG
    • DisclaimerThis presentation outlines our general product direction and should not be relied on in making apurchase decision. This presentation is not subject to your license agreement or any other agreementwith SAP. SAP has no obligation to pursue any course of business outlined in this presentation or todevelop or release any functionality mentioned in this presentation. This presentation and SAPsstrategy and possible future developments are subject to change and may be changed by SAP at anytime for any reason without notice. This document is provided without a warranty of any kind, eitherexpress or implied, including but not limited to, the implied warranties of merchantability, fitness for aparticular purpose, or non-infringement. SAP assumes no responsibility for errors or omissions in thisdocument, except if such damages were caused by SAP intentionally or grossly negligent.©  2012 SAP AG. All rights reserved. 2
    • Introduction
    • SAP mobile platform SAP, Partner, and Custom Apps Native Apps Hybrid HTML5 Apps SMS Apps Container Apps SAP App Dev Tools Third Party App Dev Tools SAP Mobile Platform SAP Afaria App Catalog Presentation Frameworks Application Application Services Management Foundation Services Device Data Sync & Caching Authentication App Lifecycle Managment oData Proxy Notification … Management SAP NetWeaver Gateway SAP Business Suite Sybase 365 Databases Third Party Apps This presentation and SAP‘s strategy and possible future developments are subject to change and may be changed by SAP at any time for any reason without notice. This document is provided without a warranty of any©  2012 SAP AG. All rights reserved. kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement 4
    • Unwired Platform - Application Types Online Apps •  Easy SAP data consumption •  Push Sybase Unwired Platform Synchronized Apps Online Apps •  Offline & Online •  Data on device Backend Sync Apps •  Data protection Connectivity •  Push Container Apps Container Apps •  HTML5 UI •  Cross platform •  Offline & Online capable This presentation and SAP‘s strategy and possible future developments are subject to change and may be changed by SAP at any time for any reason without notice. This document is©  2012 SAP AG. All rights reserved. provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement 5
    • SAP Mobility and various application models. Applications Data Light Moderate Heavy modelsUse Case Consumer B2C Productivity B2E, B2B Process B2EImportant Application •  Multi-platform device Support •  Multi-platform device support •  Large data volumecharacteristics •  Very high scalability •  Large scalability •  Synch/Offline data •  Online/ Minimal local storage •  Online/Offline persistency •  Application on-boarding •  Enterprise Security integration •  Backend Data caching •  Backend Application •  Transactional integrity IntegrationImportant Architecture •  Web/HWC/Native •  HWC/Native •  NativeElements •  Direct backend access-ODP •  ODATA/MBO •  MBO/ESDMA •  Online/Message-based •  Messaging/Sync •  Messaging/Sync •  Auto provisioning •  Self-registration •  Device Data security©  2012 SAP AG. All rights reserved. 6
    • MBO Properties andBest Practices
    • Questions frequently asked by customers/partners What parameters should I consider while I model my application?©  2012 SAP AG. All rights reserved. 8
    • Application Data ModelingMost important part of data mobilization is the data modeling. Great care has to be taken duringthe data modeling•  Data Modeling is most often the biggest part of a mobile project•  It defines the actual application and its functionsData Modeling is a complex topic•  Data Modeling best practices white paper http://www.sybase.com/detail?id=1096050&contentOnly=true•  Data Modeling Blog entry and video http://blogs.sybase.com/mobiledevelopment/2011/10/mbo-modeling-best-practices-2/ ©  2012 SAP AG. All rights reserved. 9
    • MBO Properties And Best PracticesSynchronizationLoad ArgumentsCache GroupsOperation Cache PolicyObject Queries©  2012 SAP AG. All rights reserved. 10
    • Best Practices: MBO Definition1.  Every attribute is used by the mobile application2.  MBO instance = database row (must fit within a page) •  Large row size requires larger page size impacting performance on device and synchronization •  Do not define a MBO with more than 50 attributes •  Do not use STRING data type. Instead, use STRING(n) to define the maximum string length (STRING defaults to 300) •  Promotion of VARCHAR(n) to LONG VARCHAR can occur during code generation if the specified page size is less than the calculated maximum row size •  Use larger page size during code generation and run with a smaller one on device if normal size is much lower than maximum©  2012 SAP AG. All rights reserved. 11
    • Best Practices:MBO Definition – DB Page SizeDatabase page size governed  by  maximum  row  size  derived  from  MBO  defini8on •  Lots of attributes or lengthy ones àlarger rows à larger page size •  On some devices like the Blackberry, more than memory is consumed – object handles •  Based on our observations, page sizes between 1k – 4k seems to provide best overall performance •  Do not forget to account for non Latin encoding which will result in large row size •  Large rows means less rows per page and more pages must be fetched or cached. For MBOs used in list views, this can impact the UI response©  2012 SAP AG. All rights reserved. 12
    • Load ArgumentsControl the amount of data refreshed between the EIS and CDBCreates its own partition in the CDB based on load argument value (partition key)Can be paired with synchronization parametersUser will supply values for the argument(s)©  2012 SAP AG. All rights reserved. 13
    • Synchronization ParametersAllows device to specify data set to download to the deviceSync parameter can either be mapped as a load parameter or set as a filter in UnwiredWorkspaceSync parameter data sets are cumulativeŸ  Multiple data sets are stored in client databaseŸ  Multiple data sets are synchronizedSync parameters are generated as separate classesTo synchronize new data set:Ÿ  Call getSynchronizationParameters static method on MBOŸ  Set properties on parameters objectŸ  Call save on parameters objectŸ  Call <Package>DB.synchronize©  2012 SAP AG. All rights reserved. 14
    • Example: Load and Synchronization Parameters Definition: SELECT * FROM Customer WHERE State = ? Data Source Type: SampleDB database Fill: Data is retrieved by executing the Load Operation with the load parameter set to ‘CA’ Customer ID   Name   Address   City   State   1   Intel   1 Intel Drive   Santa Clara   CA  Cache DB 2   Cisco   1 Cisco Way   San Jose   CA   3   Ultra   1 Ultra Lane   Santa Clara   CA   4   AMD   1 AMD Ave   Santa Clara   CA   5   Oracle   1 Oracle Lane   Redwood Shores   CA   6   Qualcomm   1 Qualcomm Way   San Diego   CA   Filter: This MBO has one synchronization parameter [city] Mobile application sets the synchronization parameter prior to performing synchronization to ‘Santa Clara’Client DB Customer ID   Name   Address   City   State   1   Intel   1 Intel Drive   Santa Clara   CA   3 Ultra 1 Ultra Lane Santa Clara CA 4   AMD   1 AMD Ave   Santa Clara   CA   ©  2012 SAP AG. All rights reserved. 15
    • Best Practices:MBO Modeling - IndexesUse the minimum number of indexes to support queries used by the mobile application Ÿ  Index slows down update operations on device and synchronization, especially on low end devices Ÿ  Uncheck findByPrimaryKey and FindAll queries generated for each MBO by default if they are not needed by the mobile application©  2012 SAP AG. All rights reserved. 16
    • Best Practices:MBO Modeling – Synchronization GroupsUse synchronization group to add flexibility on what to synchronizeŸ  Controls which MBOs to synchronize at a particular timeŸ  Supports prioritization i.e. get service tickets without detailsŸ  Limits the amount of data during synchronization for customers facing impaired connectivity to avoid repeatedly trying to complete a large synchronizationŸ  Think twice if the synchronization group has more than 5 membersŸ  Run time flexibility available by combining synchronization group to reduce overheadŸ  Relationship across synchronization groups may result in incomplete object graphs on the client©  2012 SAP AG. All rights reserved. 17
    • Best Practices:MBO Modeling – Cache GroupsUse cache group to control what and when to load data into CDBŸ  Break up expensive data retrievals from backendŸ  Relationship across cache group may result in incomplete object graphs in CDBŸ  Mapping cache group to synchronization group reduces unnecessary refresh not related to the triggering synchronizationŸ  Avoid circular dependencies between cache groups.Ÿ  Similarly, avoid driving the load of an MBO in one cache group based on the attributes of an MBO in another cache group©  2012 SAP AG. All rights reserved. 18
    • Best Practices:Cache Policy – On DemandRefresh triggered by synchronizationZero cache intervalŸ  Allows latest data from backend to be retrievedŸ  Unless data volume is small, should be coupled with partitioningŸ  User synchronization activities allow changes to be detectedNon zero cache intervalŸ  Reduce data loading invocations against backendŸ  Coupled with partitioning to reduce amount of data to be loaded per invocationŸ  User synchronization activities + cache interval expiration allow changes to be detectedŸ  Chances of inconsistency with backendŸ  Increase parallelism when for shared data©  2012 SAP AG. All rights reserved. 19
    • Best Practices:Cache Policy - ScheduledAutomatic refresh based on intervalŸ  Cache interval is base case notification granularityŸ  Partitioning helps to spread out initial data loadingŸ  Match backend data update frequency especially for reference dataChances of inconsistency with backend©  2012 SAP AG. All rights reserved. 20
    • Best Practices: Data Loading DesignKnow Thy DataŸ  Reference vs. Transactional: Mostly Read vs. Read/WriteŸ  Shared vs. PrivateŸ  Sources of changes: coherency implicationsŸ  Update frequency and freshness requirementŸ  Access pattern: peak and valley or distributedŸ  Data volume: size does matterKnow Thy Data SourcesŸ  Efficiency of interface (JCo, WS)Ÿ  Push vs. Pull (DCN)Ÿ  Reaction to peak load©  2012 SAP AG. All rights reserved. 21
    • Best Practices: Data Loading DesignDo not use existing API just because it is thereŸ  Evaluate its efficiency for loading data into CDBŸ  Develop custom mobile adaptation if appropriateŸ  Load what is needed not what is providedUse an efficient interface (protocol) for high data volumeUse DCN for very large data volumeŸ  Avoids large data transfer and differential calculationŸ  Does not help with initial loadingUse multiple partitions to split the loading whenever possibleŸ  Private data should consider the use of “partition by requester and device identity” or equivalentŸ  Develop backend API to load by partition if appropriate©  2012 SAP AG. All rights reserved. 22
    • Application DevelopmentSAP Mobile Platform
    • Native Object API MBOMBO Properties include:Ÿ  Attributes –  Data Source, Type, Connection SettingsŸ  Operations –  Bind to Existing Operations, or Add NewŸ  Relationships –  Mappings, Complex TypesŸ  Object Queries –  Query methods generated in Object ClassesŸ  Synchronization Settings –  Rules, Partitions©  2012 SAP AG. All rights reserved. 24
    • Synchronized Applications Development Paradigm- Development Flow 1 2 3 4 Deploy Data Model Source Code Native UI Modeling of Data to SUP Generation Development SQL DB SUP Sync App Sybase Application UI WebService Unwired Platform Data Model Integration Data Model Back End Data Persistence SAP Messaging Engine Messaging Eng •  BAPI •  Netweaver Mobile •  Webservice Model Code Configuration This presentation and SAP‘s strategy and possible future developments are subject to change and may be changed by SAP at any time for any reason without notice. This document is©  2012 SAP AG. All rights reserved. provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement 25
    • Mobile Business Object Development: Unwired Workspace©  2012 SAP AG. All rights reserved. 26
    • Simple Mobile Package Development Connect to Develop Connect to SUP EIS MBObjects©  2012 SAP AG. All rights reserved. 27
    • Simple Mobile Package Development Configure Deploy and Generate MBObjects Administer Client Code©  2012 SAP AG. All rights reserved. 28
    • iOS Client Development: Project Structure©  2012 SAP AG. All rights reserved. 29
    • Object API ApplicationsŸ  SUP provides generated code and libraries to make accessing MBOs in client applications easyŸ  Generates C# for Windows/Windows Mobile, Java for Blackberry, Objective C for iOS, Java for AndroidŸ  Infrastructure takes care of: –  Security (encryption, authentication, authorization) –  Persistence –  Efficient transfer of data –  Backend integrationŸ  Frees the developer to concentrate on UI and business logic©  2012 SAP AG. All rights reserved. 30
    • Object API Application Architecture Custom Application Code Generated Object API SUP Client Libraries Persistence Synchronization Security Messaging Database©  2012 SAP AG. All rights reserved. 31
    • Generated ClassesMBO ClassŸ  One class generated for each MBO in package.Ÿ  Class representing the MBO containing all the defined properties, operations, and relationships on the MBO.Ÿ  Contains methods for loading objects from the persistence storage.Package DB ClassŸ  Contains methods for accessing the connection profile, sync profile, accessing database, synchronizing.Ÿ  Generated code for creating databaseŸ  Naming convention: <Package Name>DB©  2012 SAP AG. All rights reserved. 32
    • Generated ClassesPersonalizationParametersŸ  Access to personalization keys MBOŸ  Wrapper around ServerPersonalization, ClientPersonalization, SessionPersonalization classesOther classes are internal©  2012 SAP AG. All rights reserved. 33
    • Client DatabaseMBOs are saved in tables in database:Ÿ  UltraLite: Windows, Windows MobileŸ  UltraLiteJ: Blackberry, AndroidŸ  SQLite: iOSCreated automatically during initializationUses surrogate key (long integer) for primary keyCan be encrypted©  2012 SAP AG. All rights reserved. 34
    • Synchronization Sequence Import Changed Records Results Client Application Unwired Server EIS Synchronize Cache Refresh Update Change Store Database Detection Results Client Cache DB DB * Steps 2 to 4 only required for on demand cache refresh policy©  2012 SAP AG. All rights reserved. 35
    • Adding Afaria provisioning toyour mobile application
    • ArchitectureAfaria® Client Mobile Application§  API is provided via Static Link Library for iOS Afaria Server Devices§  API is provided via the ClientLib.jar for Android Devices Afaria Step 1 Set Seed Data (any Config / Files etc.) Step 0 Prerequisites: Enterprise App SLL imported into project and added to compile and build paths. Afaria Admin API Calls added to logon code to pull configuration data from the Afaria server. ©  2012 SAP AG. All rights reserved. 37
    • ArchitectureAfaria® Client Mobile Application Afaria Server§  Is called from the enterprise mobile application via the API Afaria Step 1 Step 2 Set Seed Data Call the (any Config / Files etc.) Afaria Client Step 0 Prerequisites: Enterprise App SLL imported into project and added to compile and build paths. Afaria Admin API Calls added to logon code to pull configuration data from the Afaria server. ©  2012 SAP AG. All rights reserved. 38
    • ArchitectureAfaria® Client Mobile Application Afaria Server§  Is called from the enterprise mobile application via the API Step 3 Request Seed Data for Application§  Connects to the Afaria server and looks up the seed data based on the application ID Download Seed Step 4 Data for Application Afaria Step 1§  Downloads the seed data and any configuration Step 2 Set Seed Data Call the (any Config / Files etc.) Afaria Client Step 0 Prerequisites: Enterprise App SLL imported into project and added to compile and build paths. Afaria Admin API Calls added to logon code to pull configuration data from the Afaria server. ©  2012 SAP AG. All rights reserved. 39
    • ArchitectureAfaria® Client Mobile Application Afaria Server§  Is called from the enterprise mobile application via the API Step 3 Request Seed Data for Application§  Connects to the Afaria server and looks up the seed data based on the application ID Download Seed Step 4 Data for Application Afaria Step 1§  Downloads the seed data and any configuration Step 2 Step 5 Set Seed Data Call the (any Config / Files etc.) Transfer Afaria Client Seed Data§  Returns the results to the calling application Step 0 Prerequisites: Enterprise App SLL imported into project and added to compile and build paths. Afaria Admin API Calls added to logon code to pull configuration data from the Afaria server. ©  2012 SAP AG. All rights reserved. 40
    • ArchitectureAfaria® Client Mobile Application Afaria Server§  Is called from the enterprise mobile application via the API Step 3 Request Seed Data for Application§  Connects to the Afaria server and looks up the seed data based on the application ID Download Seed Step 4 Data for Application Afaria Step 1§  Downloads the seed data and any configuration Step 2 Step 5 Set Seed Data Call the (any Config / Files etc.) Transfer Afaria Client Seed Data§  Returns the results to the calling application Step 6§  Connect from the application to the SUP server Connection & Enterprise App Sync using the configuration data*. Parameters SUP Server Afaria Admin ©  2012 SAP AG. All rights reserved. 41
    • Onboarding and SSOOnboarding mobile applications and configuring SSO: best practices on how to onboard devices andconfigure single sign-on.
    • Trust: Exchange Certificates / Public KeysServer A Server BHas its own key pair as well as Server B’s public Has its own key pair as well as Server A’s publickey. key. Public Public Public Public Private Private©  2012 SAP AG. All rights reserved. 43
    • MYSAPSSO2 Interaction 1.  User enters credentials 4.  User makes request that requires 2.  SUP issues request to AS Java to backend data access authenticate user with credentials 5.  Data services makes backend 3.  AS Java responds upon successful request and includes authentication with MYSAPSSO2 ticket MYSAPSSO2 ticket The ticket is held by data services in the NetWeaver backend and does not go to the client. AS ABAP 5 Sybase 4 3 Services Unwired NetWeaver 1 Data Platform AS Java 2©  2012 SAP AG. All rights reserved. 44
    • Sybase Unwired Platform- reduces TCO and simplifies mobile development Application Development •  Windows Mobile •  Windows •  BlackBerry20% •  iPhone, iPad, iPod •  Android Platform Deliveries per Project X Number of projects = Platform advantage •  Connection management •  Data security (on device and OTA) •  Version control •  Seamless online/offline use •  Data synchronization •  Application integration •  Device detection and management •  Logging & reporting80% •  Rollout & On-Boarding (with Afaria) This presentation and SAP‘s strategy and possible future developments are subject to change and may be changed by SAP at any time for any reason without notice. This document is©  2012 SAP AG. All rights reserved. provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement 45
    • Further Information on MobileSAP Public Webhttp://wiki.sdn.sap.com/wiki/display/mobile/http://scn.sap.com/community/mobileSAP Education and Certification Opportunitieswww.sap.com/educationWatch SAP TechEd Onlinewww.sapteched.com/online @SAPMobile #SAPTechEd #Mobile Sybase Unwired Platform Community Network©  2012 SAP AG. All rights reserved. 46
    • © 2012 SAP AG. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without the express Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps, Google Mobile Ads,permission of SAP AG. The information contained herein may be changed without prior notice. Google Mobile Updater, Google Mobile, Google Store, Google Sync, Google Updater, Google Voice, Google Mail, Gmail, YouTube, Dalvik and Android are trademarks or registered trademarks of Google Inc.Some software products marketed by SAP AG and its distributors contain proprietary software components ofother software vendors. INTERMEC is a registered trademark of Intermec Technologies Corporation.Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered trademarks of Wi-Fi is a registered trademark of Wi-Fi Alliance.Microsoft Corporation. Bluetooth is a registered trademark of Bluetooth SIG Inc.IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System Motorola is a registered trademark of Motorola Trademark Holdings LLC.z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Architecture, Power Systems, POWER7,POWER6+, POWER6, POWER, PowerHA, pureScale, PowerPC, BladeCenter, System Storage, Storwize, Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH.XIV, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere, Tivoli,Informix, and Smarter Planet are trademarks or registered trademarks of IBM Corporation. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos areLinux is the registered trademark of Linus Torvalds in the United States and other countries. trademarks or registered trademarks of SAP AG in Germany and other countries.Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered trademarks of Adobe Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, WebSystems Incorporated in the United States and other countries. Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business ObjectsOracle and Java are registered trademarks of Oracle and its affiliates. is an SAP company.UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and servicesCitrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc.registered trademarks of Citrix Systems Inc. Sybase is an SAP company.HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C®, World Wide Web Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered trademarks of Crossgate AGConsortium, Massachusetts Institute of Technology. in Germany and other countries. Crossgate is an SAP company.Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C, Retina, Safari, Siri, All other product and service names mentioned are the trademarks of their respective companies. Dataand Xcode are trademarks or registered trademarks of Apple Inc. contained in this document serves informational purposes only. National product specifications may vary.IOS is a registered trademark of Cisco Systems Inc. The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior written permission of SAP AG.RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry Torch, BlackBerryStorm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App World are trademarks or registeredtrademarks of Research in Motion Limited. ©  2012 SAP AG. All rights reserved. 47