Upload
xavier-agnetti
View
861
Download
2
Embed Size (px)
DESCRIPTION
Citation preview
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Delivering Collaborative Applications with AIR and LiveCycle Data ServicesAlistair McLeod
Xavier Agnetti
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
What we aim to cover in the next 45 minutes…
• Show how collaborative applications can be built with AIR and LCDS
• Explain the challenges in building such applications
• Provide some hints and tips for building your own collaborative applications
• Show some of the features of Adobe AIR
• Demonstrate the power of Data Management Services
• Show how a Wiimote and speech recognition can be used to control an AIR application
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Agenda
• Collaborative Applications
• BlazeDS and LiveCycle Data Services
• Application Demo
• Building a Collaborative Application
• Deep Dive into Application Code
• Summary and Questions
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Collaborative Applications
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
What do we mean by Collaborative Applications?
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
BlazeDS and LiveCycle Data
Services
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
BlazeDS Overview
Easily connects Flex & AIR applications to existing server logic
High performance data transfer for more responsive applications
Server push over standard HTTP Full pub/sub messaging that extends
existing messaging infrastructure Free and open source Publication of the Action Message Format
(AMF3) binary data protocol specification Certified builds, warranty protection and
enterprise support subscriptions available
BlazeDS is the remoting and HTTP-based messaging technology which Adobe is contributing to the community under LGPL
BlazeDS
Data Management
RPC Services
Messaging
ServiceAdapters
Data Synchronization
Off-line Applications
Data Paging
Web Service
HTTP Service
Remote Object Service
Publish & Subscribe
Collaboration
Real Time Data Push
Proxy Service
Web-tier Compiler
Portal Deployment
RIA-PDF Generation
LiveCycle
ColdFusion
Hibernate
SQL
JMS
Java
Custom
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
LiveCycle Data Services ES Overview
LiveCycle Data Services is a set of Java EE components and APIs used to:
Create data-intensive RIAs with less code, less risk, and accelerated time to market due to an innovative client-server programming model
Integrate RIAs with existing applications, back-end data, and JEE infrastructure
Easily integrate RIAs with LiveCycle document and process services
Enable collaboration, offline AIR and real-time data streaming applications to be built in a scalable and reliable manner with robust publish and subscribe messaging
Generate PDF documents from RIAs that include graphical assets
LiveCycle Data Services ES
Data Management
RPC Services
Messaging
Data Synchronization
Off-line Applications
Data Paging
Web Service
HTTP Service
Remote Object Service
Publish & Subscribe
Collaboration
Real Time Data Push
Proxy Service
Web-tier Compiler
Portal Deployment
RIA-PDF Generation
LiveCycle
ColdFusion
Hibernate
SQL
JMS
Java
Custom
ServiceAdapters
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Feature Comparison
Feature BlazeDSLiveCycle Data
Services ES
Java Remoting √ √
Web Proxy √ √
JMS Adapter √ √
AJAX Client Libraries √ √
Administrative Console √ √
Clustered Messaging √ √
Pub/Sub Messaging √ √
Web container-based messaging service (100’s of clients/CPU) √ √
Dedicated messaging service (1000’s of clients/CPU) √
Per-client Quality of Service √
Data Management Service √
Data Paging √
Flex-LiveCycle Integration √
RIA-to-PDF Generation √
Offline Data Synchronization (AIR) √
WSRP/Portal Integration √
SiteMinder Integration √
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Application Demo
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Application Features
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Application Demonstration
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Building a Collaborative Application
• Application Architecture
• Technologies Used
• Challenges
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Building a Collaborative Application
• Application Architecture
• Technologies Used
• Challenges
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Application Architecture
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Application Structure
Client Layer
Adobe Integrated Runtime
Adobe Cairngorm
Alternativa 3D
WiiMoteKeyboard
Application Layer
FMSLCDS
DMS
Messaging
Persistence Layer
HSQL DB
Microphone
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Building a Collaborative Application
• Application Architecture
• Technologies Used
• Challenges
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Use of Adobe AIR
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Use of LiveCycle Data Services
Chat between the retailer and customer
Data push to retailer application Synchronization of views between
the retailer and customer Conflict resolution Store local changes while offline,
and commit them when back online Adapter architecture Paging large data sets Generate customer configuration as
LiveCycle Data Services ES
Data Management
RPC Services
Messaging
Data Synchronization
Off-line Applications
Data Paging
Web Service
HTTP Service
Remote Object Service
Publish & Subscribe
Collaboration
Real Time Data Push
Proxy Service
Web-tier Compiler
Portal Deployment
RIA-PDF Generation
LiveCycle
ColdFusion
Hibernate
SQL
JMS
Java
Custom
ServiceAdapters
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Use of Flash Media Server
• Audio and video conferencing
• Very little development effort• No server side code
• Alternative solution: use CoCoMo• Hosted service
• Public beta now available
• See other Max sessions for details
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Displaying 3D model
• Straightforward API
• Better performance than PaperVision 3D
• Easier integration with 3DS MAX models
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Using the Wii Remote as a Control Device
Wiimote
WiiFlash server
WiiFlash AS3 API
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Speech recognition on AIR
Wiimote
WiiFlash server
WiiFlash AS3 API
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Building a Collaborative Application
• Application Architecture
• Technologies Used
• Challenges
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Challenges in Building Collaborative Applications
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Deep Dive into Application Code
• Presentation Model
• Data Management Services
• Large Data Sets
• Message Broker
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Deep Dive into Application Code
• Presentation Model
• Data Management Services
• Large Data Sets
• Message Broker
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
What is a Presentation Model?
• A class that contains the state and logic required by a view.
• The general purpose of the Presentation Model is to separate concerns
• The view is responsible for rendering the presentation model
• The view hence holds a reference the presentation model
• The presentation model does not know anything about its view
• It can then be unit-tested in isolation
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Domain Layer
Cairngorm and the Presentation Model
Integration TierView LayerPresentatio
n Layer
Arthur
Ford- [email protected]
Zaphod –
Arthur –
Tricia–
Marvin =
Add a Contact Contact list
Add a Contact
Add a Contact
Presentation Model+ contacts : ContactDomain+ addContact (name, email)
Presentation Model+ contacts : ContactDomain+ addContact (name, email)
CMDCMD CMDCMD CMD
BusinessDelegate
ContactVOContactVO
ServiceLocator
model.addContact(firstname, email)
Cairngorm
Event
Cairngorm
Event
Serv
ice
Serv
ice
Serv
ice
Serv
ice
Serv
ice
Serv
ice
Serv
ice
ContactVOContactVO
FrantController
ContactsDomain+ contacts : List
ContactsDomain+ contacts : List
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Cairngorm and Presentation Models - Differences
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Deep Dive into Application Code
• Presentation Model
• Data Management Services
• Large Data Sets
• Message Broker
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Data Management Services (DMS)
DMS is data-driven (not request-response paradigm) The user gesture/command pair does fit well here
DataModel is responsible to talk to the DataService, and store the data retrieved from it
Ability to bind to DataService attributes like commitRequired.
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Domain Layer
Cairngorm and Data Management Services
Integration TierView LayerPresentation
Layer
Arthur
Ford- [email protected]
Zaphod –
Arthur –
Tricia–
Marvin =
Add a Contact Contact list
Add a Contact
Add a Contact
ServiceLocator
model.addContact(firstname, email)
Client DataServices
Serv
ice
Serv
ice
Data Model+ contacts : List+ addItem( item )
Data Model+ contacts : List+ addItem( item )
Presentation Model+ contacts : ContactDataModel+ addContact (name, email)
Ford- [email protected]
Zaphod –
Arthur –
Tricia–
Marvin =
Add a Contact Contact list
Add a Contact
Add a Contact
ServiceLocator Client DataServices
Serv
ice
Serv
ice
Data Model+ contacts : List+ addItem( item )
Data Model+ contacts : List+ addItem( item )
Presentation Model+ contacts : ContactDataModel+ addContact (name, email)
Remote DataServices
Serv
ice
Serv
ice
Ford- [email protected]
Zaphod –
Tricia–
Marvin =
Add a Contact Contact list
Add a Contact
Add a Contact
Arthur
Ford- [email protected]
Zaphod –
Tricia–
Marvin =
Add a Contact Contact list
Add a Contact
Add a Contact
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Deep Dive into Application Code
• Presentation Model
• Data Management Services
• Large Data Sets
• Message Broker
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
How to deal with large dataset?
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Deep Dive into Application Code
• Presentation Model
• Data Management Services
• Large Data Sets
• Message Broker
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Message Broker
Listeners are registered in the Broker singleton
Whenever a listener sends a message, the broker calls its producer and waits for a response in the consumer.
Then every listener is notified that a message is ready to be consumed
Listener /
Producer
Message Broker
Local Producer
Local Consum
er
Listener
Listener
Listener
Messaging
Destination
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Miscellaneous tips
• Set different publisher names in order to launch several instances of the same AIR application
• MessagePerformanceUtils built-in LCDS 2.6 helps optimizing network round-trip for your application
• In Flex, in services-config.xml, the tokens are replaced by the app server
<endpoint url="http://{server.name}:{server.port}/{context.root}
• In AIR, either • you replace it directly by
<endpoint url="http://myserver:8080/myContextRoot
• Or you create new channels set in the client code, loading the endpoint URLs from a local file
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Summary and Questions
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Summary
• Show how collaborative applications can be built with AIR and LCDS
• Explain the challenges in building such applications
• Provide some hints and tips for building your own collaborative applications
• Show some of the features of Adobe AIR
• Demonstrate the power of Data Management Services
• Show how a Wiimote and speech recognition can be used to control an AIR application
®
Copyright 2008 Adobe Systems Incorporated. All rights reserved.
Any Questions
Questions? (simple please)