Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
www.sybase.com
Table of Contents
1 Mobilizing the Enterprise
1 Online Mobile Applications
1 Offline Mobile Applications
1 Common Characteristics
2 Overview of the Sybase Unwired Platform
3 Basic Development and Deployment Process
4 Common Elements of the Architecture
4 Network Topology
5 Administration and Monitoring
6 Device Services
7 Messaging Services
7 Security Services
7 Mobile Workflow Enablement
7 Workflow Components
8 Hybrid Web Container Applications
9 Container Messaging Components
10 Mobile Synchronization Applications
10 Cache Synchronization
13 Synchronization with Data Orchestration Engine (DOE)
16 SAP OData Applications
Introduction
This document is for service providers and enterprises that plan to deploy the Sybase Unwired Platform (SUP) and
need a functional understanding of the technology to assist in making informed decisions about choosing the correct
mobile technology to use for a particular use case. It includes some level of detail about the internal workings of the
platform that may prove useful to administrators.
This document serves as a foundation for other more specific explanations of technical aspects of the system, for
example, sizing, performance and tuning, architecture approaches, and security. Developers may find it useful to
consult other material specifically related to development fundamentals or tutorials.
Connect
Databases
Consume
Create
Heterogeneous
data sources
Heterogeneous
mobile devices
Eclipse
BlackBerry
iPhone
Web
Services
Software
Applications
SAP
NetWeaver
Gateway
iPad
Mobile
Business
Objects
Hybrid Web
Container
OData
Interface
Native
Applications
Android
Windows
Windows Mobile
Management Console
Control
In Unwired Platform, one or more of these technologies come together to provide support for a few major types of
mobile applications, including:
Hybrid Web container applications:
Simple cross-platform request/reply or lookup
Mobile workflow enablement
Native applications using synchronization:
Result-set cache synchronization in an SUP standalone mode
Data consolidation and distribution with the Data Orchestration Engine (DOE)
Native applications using the SUP OData SDK:
Simple device-specific request/reply or lookup with rich UI
The purpose and function of the major application pillars is discussed in more detail later in this document, along
with the major technology components that support them.
Enterprise System
customer
Attributes (9)
Q
Q
Q
Q
Q
Q
Q
Q
Q
Device Representation
fname : STRING(15)
lname : STRING(20)
address : STRING(35)
city : STRING(20)
state : STRING(2)
zip : STRING(10)
phone : STRING(12)
company_name : STRING(35)
+ id : INT
Operations (3)
update()
delete()
create()
Subset
Personalize
Mobilize
Using Eclipse tooling and the MBO model, a developer creates a package containing one or more MBOs that can be
deployed into the server runtime environment. Each package is assigned a version that is associated with the specific
runtime artifacts generated by the deployment architecture.
Publish in
Unwired Server
Generate
Device
Artifacts
Develop
Device
Application
Test on
Emulator
and/or Device
When using the Data Orchestration Engine (DOE) for communication with the back end, the developer starts by
describing back-end interaction and the application content model within the DOE tooling. The application content
model includes mobile entities, called data objects, that are reusable across applications, and distribution models
that are application- or deployment-specific. The product of this design activity is a package that can be deployed,
via tools, into the Unwired Server, where artifacts are generated for storing and forwarding messages between server
and device. In effect, the deployment tooling autogenerates MBO constructs for DOE communication.
Once a mobile package is available, the developer can generate device-side artifacts that form the basis of mobile
application interactions with SUP services and data. One or more packages can be used within a single application.
The same package version information is embedded in the device-side artifacts; this information matches the device
application with the correct runtime version on the server. The specific development details of different application
types vary; see the developer-specific guides for more information.
SUP also supports the Open Data Protocol (OData) as a back-end resource. OData is a resource-based Web protocol
for querying and updating data. OData is owned by Microsoft, but has been released under the Open Specification
Promise, allowing anyone to freely interoperate with OData implementations.
Where an OData source is used as the back end, the application developer does not need to create any model
elements (MBOs) in the tooling, but rather inherits a service model from the service document published from the
back end (as in SAP NetWeaver Gateway). These OData service documents contain all the information the device
developer needs to parse and interact with these data streams.
1 Relay Sever is an optional component that may be replaced by other third-party proxy technologies or firewall management
techniques.
Internal Network
External Network
Internal
Firewall
Unwired
WorkSpace
(Eclipse)
External
Firewall
DMZ
Unwired Server
SCC
Admin Console
Relay Server
Afaria Server
HTTP/S
HTTP/S
The following sections describe some of the technology-specific SUP usage patterns and provide a general
discussion of the architecture involved.
Administration and Monitoring
The Unified Agent Service acts as a central control and process monitoring facility for all Sybase server technology
(not to be confused with application monitoring, which is done in the core server stack). This JMX-based agent has an
embedded Web server to which Sybase Control Center communicates, and an associated database for managing its
own control and alerting metadata.
Distributed Level
SOAP
RPC Client
RMI Connector
HTML Adapter
SOAP-RPC Adapter
JMX
Service Beans
UA
Service Beans
Discovery
Service Beans
Timer, Monitoring,
Etc.
Security, Sessions,
File Transfer,
RemoteShell, Discovery,
Messaging, Etc.
Agent Level
MBean Server
Instrumentation Level
SQL Anywhere
Sybase
Servers
Unwired
Servers
Native Code
HTML5 / JS
Runtime
Native Code
Business
Logic
Native Code
HTML5 / JS
Runtime
Native Code
Synchronization
Services
HTML5 / JS
Runtime
OData Parser
Application
Specialization
Security
Core
Application
Services
HTML5 / JS
Hybrid Apps
OData SDK
Security features are embedded into the SDK to support secure certificate storage, use of these artifacts in
authentication such as SSO (X.509 and SSO2 logon ticket), and other features related to database encryption. There
are APIs for the certificate store, logon certificates, and the data vault. Each device application type makes use of the
same set of security features.
Messaging Services
The workflow architecture, Hybrid Web applications, DOE, OData SDK, and notification mechanism leverage a
proprietary message transport to move data between device and server. This messaging transport is based on the
HTTP protocol. The messaging protocol layered over HTTP provide quality of service for compression, encryption,
and asynchronous guaranteed delivery.
Messaging may be synchronous or asynchronous; only asynchronous messaging provides guaranteed delivery
between the device and the enterprise back end. In-transit asynchronous messages are stored in consolidated
database (CDB) queues, and on the server and on the device they reside in the device database until processed
by the mobile application infrastructure layers. These messages are encrypted on the device and in transit.
To receive messages, devices must be registered with the server via a process called onboarding. A device can be
onboarded either manually (administratively whitelisted) or through an automatic process based on a security domain
that is associated with the device users login credentials. Within Sybase Control Center, the administrator associates
packages with a security domain under the heading of an application during deployment.
Security Services
Unwired Platform provides pluggable Common Security Infrastructure (CSI) features for authentication,
authorization, and auditing. Users can authenticate against an array of authorities including LDAP and Active
Directory. Secure connections can also be established with Secure Sockets Layer (SSL) between the device and
replication channel. Device databases may also be encrypted with a user-supplied key.
Message Processor
Mobile Device
Message Interceptor
Device Inbox
Transformer
Transformer
Queue
Device Messaging
DB
Messaging Service
DCN Servlet
JMS
Host
EIS
DCN Servlet
MMS
Response Processor
Application(s)
Responder
Response
Queue
DS
Consolidated
Database
Once transformed, the augmented message may be queued for transmission to the mobile device when the device
next connects to the SUP server, or the message may be sent directly to the device. These messages are stored in the
devices in-box where they await the users actions. When a user loads an in-box message, the appropriate form is
loaded by the workflow application, and the user may perform application-provided actions (such as approving an
expense request).
The device users responses are sent back to the messaging server. Depending on the application, the response
action may be queued, or may result in a synchronous action; this behavior is different from outbound message
transformations, which are always queued. Regardless of whether the response action is queued or performed
immediately, the application communicates with the SUP server to perform the actions unit of work.
The Hybrid Web container supports three basic patterns. In many applications, a combination of these patterns are
applied to implement specific use cases.
Notifications also referred to as server-initiated, these actions are performed in the back end by external
applications in the context of a business process result in mobile users being notified with information.
Lookup mobile users take action on devices to request information from the back end.
Action/Decision Forms users take action on devices to submit a form, make a decision, and so on, which results
in some enterprise business process state transition.
The Hybrid Web container is the runtime on the device within which these patterns are executed. The applications
formed from these patterns are referred to as Mobile Workflows in the context of SUP 2.1, although technically,
workflow is a specific use case of the general technology.
The Hybrid Web container is a native application with an embedded browser that allows developers to build
applications with the simplicity of Web development combined with the power of native device services. SUP 2.1
delivers a native application for iOS, Android, Windows Mobile and BlackBerry platforms. In addition to the standard
Web browser capabilities available in standard HTML/CSS/JS code, the Hybrid Web container also provides these
additional device and SUP services:
Offline cache
Reliable messaging
Secure store
Application provisioning
Integration with SUP middleware for MBO data exchange
In future versions, other device services such as camera, contacts, and so on are being planned.
Container Messaging Components
Hybrid Web Container Device Runtime
This device-resident native application provides a runtime environment for Hybrid Web applications, and must
be deployed once using an application provisioning tool such as Afaria. Thereafter, applications are automatically
deployed when the container runs on the device, and the protocol between the container and the server identifies
version differences.
Container App
Designer
MBO Tooling
Container Metadata
(HTML5/CSS/JS)
Container Client
Metadata
(HTML/CSS/JS)
Workflow
Server
Metadata
Unwired Server
Lookup/Search
Browser
Container Services
(Storage/Messaging/
Security/Provisioning)
MBO
Metadata
MBO
Cache
Pull
Push/DCN
SAP
System
XML Messages
Figure 8. Hybrid Web Components
9
10
This style of coupling between the device and the back-end queries implies that the back end must be able to
respond to requests from the middleware based on user-supplied parameters, and serve up mobile data appropriately.
In other words, the back end should be capable of returning what an individual device user may request by supplying
an appropriate interface. Normally, some mobile-specific adaptation is required within SAP Business Application
Programming Interfaces (BAPI). Because of the direct nature of application parameter mapping and RBS protocol
efficiencies, SUP cache synchronization deployment is ideal for:
Rapid synchronization of large payloads to devices (may be due to mostly disconnected scenarios)
Situations where ad hoc data downloads might be expected
SAP or non-SAP back ends
Large payloads, for example, can occur in task worker (service) applications that must access large product catalogs,
or where service occurs in remote locations and workers might synchronize once a day. While SUP replication-based
synchronization does benefit from middleware caching, the direct coupling requires the back end to support an
adaptation where mobile user data can be determined.
Cache Synchronization Components
The goal of synchronization is to keep data views (that is, the state) consistent between the device and back-end
tiers. The assumption is that if data changes on one tier (for example, the enterprise system-of-record), all other tiers
interested in that data (mobile devices, intermediate staging areas/caches, and so on) are eventually synchronized to
have the same data/state.
Core Components
The SUP server synchronizes data between the device and the back end by maintaining records of device
synchronization activity in its consolidated database, along with any cached data that may have been retrieved from
the back end or pushed from the device. The SUP server employs several components in the synchronization chain:
Mobile channel interfaces provide a conduit for transporting data from and to remote devices. There are two
main channel interfaces that provide messaging and replication:
Messaging channel serves as the abstraction to all device-side notifications (BES, APNS, and others) so that
when changes to back-end data occur, devices can be notified of changes relevant for their application and
configuration. This channel is also used to enable data synchronization on iOS.2
Replication channel serves as the conduit over which data is replicated between devices and the mobile
middleware. This is an efficient database row replication technology.
Mobile Middleware Services (MMS) arbitrates and manages communications between device requests from
the mobile channel interfaces in the form that is suitable for transformation to a common MBO service request
and a canonical form of EIS data supplied by data services.
Data Services (DS) is the conduit to enterprise data and operations within the firewall or hosted in the cloud.
DS and MMS together manage the consolidated database (CDB), where data is cached as it is synchronized with
client devices.
Once a mobile application model is designed, it can be deployed to the SUP server where it operates as part of a
specialized container managed package interfacing with MMS and DS components. Cache data and messages are
persisted in the databases in the data tier.
Changes made on the device are passed asynchronously to the MMS component (with respect to the download)
and replayed in their own thread against the data services interfaces with the back end. Data that changes on the
back end as a result of device changes, or those originating elsewhere, is replicated to the device database. This
download phase occurs either because the device receives a notification causing the device to synchronize (if so
configured) or because the user manually invokes synchronization.
2 In a future release, cache synchronization will use the replication channel for iOS as is currently done with all other devices.
11
Public Network
DMZ
Private Network
Application(s)
Inbound Queue
UltraLite
Relay
Servers
UltraLite
Web
Sync
MBS Client
RBS Client
JMS
Host
Outbound Queue
Replication Channel
Jaas
Data Services
Mobile Devices
Messaging Channel
Mobile Middleware
Services
Message
LDAP Server
Connection
Pools
MobiLink
(Active/Passive HA)
Data
Change
Notification
Consolidated
Database
Cluster DB
Databases
SAP Applications
SOAP/
REST
Services
User Agent DB
Advantage
Messaging DB
The Cache
Cache-based synchronization uses the cache as a mirror of what users see on the device. While the cache is not
the system-of-record, it allows the server to compare the last time cache elements were updated with the time
the specific data elements on the device were last successfully synchronized. This mechanism allows the server to
download only the elements that have changed since the last device synchronization.
The cache is manifested in the consolidated database (CDB), which is a relational database management system.
The server, or more specifically the application package hosted in the application server, communicates to the CDB
through JDBC connection pools, which can be configured in the administration console. The MBO parameters and the
relationship between MBOs define the shape of cache tables. The internal implementation of these tables and the
associated queries are not public and may change from release to release.
Each package has its own cache, and the life cycle of the cache is the same as the package. If the package is
removed from the server, the cache is removed. Cache data can be shared or partitioned based on application
parameters defined in the MBO model. If an MBO definition loads data where two application users have overlapping
synchronization parameters, the users are sharing the same data. However, if the application model defines the
MBO load parameters in way that makes the data unique to a user (for example, an employee ID) then the cache is
partitioned and not shared.
Shared cache data is typically reference or master data that is not updated by device users. Updating shared data
incurs locking costs in the server and should be, if possible, performed infrequently and during periods of low user
activity. The validity of cached data, like reference data, can be made invalid by configuring a cache group. By default,
all MBOs belong to the same cache group. Available refresh settings for a cache group include:
On (device) demand with a specified window of cache coherency
Periodically after initial load
Once for use where the initial load is done with a load query
Always valid because the cache group is updated by DCN
12
Once the device demand or cache schedule triggers a load, all elements in the cache group are refreshed. To the
extent possible, the MBO model should be designed to partition user data (via a unique user-specific key) that is
meant to be updated from the device.
The cache can be updated by either a device user with the proper security role or by a data change notification
(DCN). When a device updates the cache, the changes from a result set can be optionally written to the cache along
with the update to the back end.3 Alternatively, a portion of the cache can be invalidated, whereupon it is refreshed.
However, do not use this method when a DCN is used to populate the cache, since the server needs an operation to
update the cache when it is invalidated.
The DCN is a HTTP/JSON intranet-facing interface exposed through the built-in Web server for each package and
its associated MBOs, with the intent that the back end may proactively send changes to update the cache. Properly
authenticated DCNs may send complete payload changes or notifications that something has changed (causing the
cache to be invalidated for that record).
3 Restrictions apply to the mapping of back-end operations that are intended to update the cache so that the MBO attributes in the
cache are properly maintained. During an update with this policy the back-end data may not be properly reflected in the cache if
the back end further updates fields that have been applied during the cache write-through. This issue will be addressed in a future
version of the server.
13
Enterprise
Application
R
CRUD
Services
Backend Adapter
NW Mobile
Client
Channel
R
Application
Data Store
Standard Data
Object Flow
Key
Mapping
Service
Conflict
Detection
Service
Receiver
Generation
Flow
Validation
Service
Subscription
Generation
Flow
Hierarchy Data
Object Flow
Generic
Synchronization API
DOE Flow
Manager
Data Object
Model
SUP
Transport
Channel
Custom
Service
Flow
Definition
Key
Lookup
Tables
Queues
R
Consolidated Data Store Service
Consolidated
Data Store
R
Monitoring & Central Inbox
R
R
Data Distribution
Distribution Engine
R
DOE Design
Time Modeler
Data
Distribution
Service
Distribution
Model
Rule
Evaluation
Service
Receiver
Metamodel
Extract
Service
Receiver
Inventory
Association
Tables
Subscription
Tables
DOE
Receiver
Administrator
Data Consolidation
Back-end adapters enable DOE to connect to the source EIS in a loosely coupled way. To be able to communicate
with the corresponding DOE back-end adapter, the EIS must expose business data by implementing a set of services.
In the case of SAP Business Suite, these services are implemented as ABAP function modules called BAPI wrappers.
BAPI wrappers are remote function call (RFC)-enabled and can retrieve or update multiple data sets simultaneously.
DOE uses the RFC to retrieve business data from the back end (push and pull) as well as to send data updates
performed on the mobile client to the back end.
Back-end adapters also provide functionality to map data from source EIS to DOE data representations. Back-end
EISs and (device) receivers may use different keys to identify data; therefore, mapping may be required. Custom
services, similar in semantics to the BAPI wrappers, must be developed for each other EIS.
To enable a fast and scalable synchronization process, DOE consolidates the business data required by the receivers.
DOE requests data from the source EIS and stores a replica of that data in its own store, called the consolidated data
store (CDS). Within the DOE, data objects represent the structure or schema of the data in the back end. In the backend EIS, business objects or database tables provide the data for the data objects. Examples of business objects are
sales orders and customers.
Schemas for data exchange or data objects are defined at design time. At runtime, when actual data is exchanged
between the EIS and DOE, data from these back-end sources is stored as instances of data objects. The data
consolidation component, maintains integrity across the data object instances even if the data for the same data
object is coming from different back-end sources. For example, sales order data is received from the SAP CRM system,
whereas product master data is received from SAP ERP.
14
The integrity constraints between these different data objects are specified by defining associations and
dependencies. Data from the CDS is sent to receivers according to data distribution rules. The receivers may modify
the data and send updates to DOE. DOE sends the modified data back to the original source (EIS) of the data
object for validation. Only validated data is updated to the CDS, and confirmations of successful validations and
modifications are sent back to the receiver that initiated the modification. In case of rejections by the EIS, negative
acknowledgements are sent to the receivers.
Data Distribution
In the CDS, business data is stored in a format that is optimized for data distribution. The data distribution
component determines which data to send to each receiver, (receiver determination) and triggers the distribution. The
receiver determination is based on rules, which determine the data to be sent to an individual receiver. Subscription is
the assignment of a data object instance to a receiver. Data distribution comprises:
Receiver management
Subscription management
Receiver determination
The DOE supports automated generation of receivers and their subscriptions based on rules. All receivers in the
DOE are stored in the receiver inventory. The attributes of a receiver are defined by the receiver meta model (RMM).
Subscriptions can be generated automatically when new receivers are added to the DOE. New receivers can be
added based on available back-end EIS information. All data that effects creation of new subscriptions is updated
from the EIS into the DOE using data objects. For example, sales order information must be distributed to sales
representatives, each of whom carries a smartphone. Each sales rep should receive only sales orders relevant for the
region to which he or she is assigned. The IT departments asset inventory stores information about which employee is
assigned to which smartphone device.
Furthermore, the SAP CRM and SAP ERP systems provide information about the sales region where a specific
employee is working. A simple rule stating that data distribution of sales orders to sales representatives based on
sales region can be executed automatically, without administrator intervention. DOE automates the process to
the extent that whenever a new employee is added in the ERP or CRM back-end system and is assigned to a new
smartphone device that is recorded in the asset inventory store, the employee instantly starts receiving daily workrelated data on his or her device, including new software if required.
The rules governing the creation of a subscription are stored within a distribution model. Based on these rules,
the DOE performs receiver determination to calculate which receiver needs which data. To do so, the receiver
determination component first compiles the rules into a form that can be used efficiently, in terms of execution
time, at runtime. The relationship between the data object instances from the CDS and the receiver is explicitly
precomputed and stored in lookup tables.
The compiled form of the rules of the distribution model is also stored in the lookup tables. Whenever a
subscription changes due to a change in the governing rules, the data distribution component recalculates the
relationship for the corresponding receiver and updates the lookup tables. Existing data may need to be deleted from
receivers, or new data may be required to be associated with existing receivers.
For example, the distribution of sales orders to the smartphones of sales representatives is based on the sales
region. A receiver-determination step is triggered whenever a sales order message with updated region information
comes from the back-end system, or whenever a new user is created in the back-end system. To handle thousands of
receivers, the algorithm is optimized for handling a mass volume of updates.
15
SAP Backend
SUP Connector
(SOAP XML +
ESDMA Bundle)
Sybase DOE
Connector
DOE Consolidation
and Rules
Distribution
ESDMA
Converter
ERP
CRM
PLM
BASIS 7.0
BASIS 7.1
Sybase Unwired
Platform
Push Messaging
Device
Sync
Stack
Device
Workflow
Stack
The DOE Connector (DOE-C) is the reliable bidirectional interconnect component between SUP and DOE. This
interconnect transports the XML payload, and the SUP messaging layers transform this payload to a form suitable for
transmission to the devices. A reliable, encrypted, compression-capable, messaging infrastructure is used between
the SUP server and the device. Once on the device, client-side messages are stored within the message-based
synchronization (MBS) SDK persistence framework.
Monitoring of SUP messages in the store and forward infrastructure takes place in Sybase Control Center.
16
Public Network
DMZ
Private Network
Unwired Server
Container
Services
Messaging Channel
OData
Application(s)
Outbound Queue
OData SDK
HTTP Messaging
Proxy
Security/Config
Logging
Relay
Servers
Relay Server
Outbound Enabler
Async Channel
Load Balancer
Mobile Devices
Inbound Queue
Sync Channel
Data
Change
Notification
JMS
Host
Mobile
Middleware
Services
HTTP
Callback
Router
Data
Services
HTTP
Proxy
Handler
Messaging
Channel
Domain Logging
Unified Agent Service
Jaas
LDAP Server
Single Sign
on URL
Connection
Pools
SUP
Data Stores
Consolidated
Database
Cluster DB
Monitor DB
Sybase Control
Center
User Agent DB
SAP Applications
When device applications communicate with the Gateway, they do so with a synchronous message interface
(providing their own retry capability for interrupted communications). The synchronous interface avoids message
queues on the device, in the middleware, and associated database disk I/O, and may allow horizontal scaling of
the middleware. Using synchronous messaging where a seamless online and offline experience is required places
additional burden on the application developer.
Device users may publish their logical device address to the Gateway, allowing data change notifications to be
forwarded from the Gateway to SUP and onto the device. These notifications are guaranteed to be delivered to the
device. Device notifications may be registered over device platform-specific channels like APNS or BES.
As with other messaging facilities, monitoring and logging of messages is managed through the Sybase Control
Center management console.
17
Sybase, Inc.
Worldwide Headquarters
One Sybase Drive
Dublin, CA 94568-7902
U.S.A
1 800 8 sybase
www.sybase.com
Copyright 2011 Sybase, Inc. All rights reserved. Unpublished rights reserved under U.S. copyright laws. Sybase, the
Sybase logo, Afaria and MobiLink are trademarks of Sybase, Inc. or its subsidiaries. indicates registration in the
United States of America. SAP, the SAP logo and SAP NetWeaver are the trademarks or registered trademarks of SAP
AG in Germany and in several other countries. All other trademarks are the property of their respective owners. 11/11