Upload
rosalind-burke
View
218
Download
2
Embed Size (px)
Citation preview
Introduction to LiveCycle Data Services
Nick Kwiatkowski
Michigan State University
What is LiveCycle Data Services?
• LiveCycle Data Services, apart of the LiveCycle ES package is a middle-ware application designed to better connect your client applications to your application server.– Manage large amounts of data– Establish messaging between clients and
servers– Help retrieve/store data via Remoting and Proxy
configurations.
The Middleware
Brow
ser
Flex or AJAXapplication
AIRApplication
LiveCycle DS
Java
ColdFusion
.NET
Data
Presentation Layer Business Layer Data-Access Layer
PHP
The Middleware
• But you can already connect directly to your application server without LDS!– That is true, however, many features are not
available in just the AMF/Remoting situation
• LDS cannot talk directly to databases.
Other Gotcha’s
• LDS is a J2EE application– Requires a server– Requires Java– Often not supported by shared-hosting
environments– Licensed software (we will get more into that
in a minute)
• Fairly difficult to setup (not install)– Paybacks are great, however.
LDS Licensing
• Small application can make use of LiveCycle Data Services ES Express Edition for FREE.– Limited to 1-CPU– No Clustering of data
• Larger Applications need to purchase LDS-ES.– Expect about $10,000 to $15,000 per CPU
Free?
• Yes, LDS is free for development and deployment for small applications– Including commercial applications.
• Adobe is trying to get the ‘large guys’ to pay for everybody’s toy-box.
• Available at http://www.adobe.com/products/livecycle/dataservices/
What LDS brings to the table…
• Data Management– Have your application server send large
amounts of data to LDS, and let it worry about passing it to the client. This includes pagination of data, and data synchronization.
Flex Client LDS App Server
What LDS brings to the table…
• Data Messaging– Allows Flex clients to communicate with each
other without tying up resources on the App server (the App server can participate in these conversations)
Flex Client
AJAX Client
Flex Client
LDS App Server
What LDS brings to the table…
• Data Proxying:– You can proxy your web-service or Remoting
calls through your LDS to help get around restrictions in firewalls or policies.
Flex Client LDS
Web Service
App Server
Playing with the beast
• In our first demo, we will show how to create a simple chatting application using the Messaging feature of LDS.– This will include NO server-side code
Playing with the beast
• Installation Demo– Really, it is that easy
• Configuration Demo– Don’t they have a GUI for this stuff?
• Programming Demo– Simple Chatting Application
Configuration
• All of the configuration scripts are located in the :– C:\fds2\jRun4\servers\default\flex\web-inf\flex– <coldfusion install>/wwwroot/WEB-INF/flex/
• You will see many .XML files, including:– data-management.xml– messaging-config.xml– remoting-config.xml– proxy-config.xml
Configuration
• For our demo, we will need to modify the “messaging-config.xml” file.
• We will want to add a new “destination”.
• Our application will both “publish” and “subscribe” to this destination
Client Destination ClientPublish Subscribe
Configuration
Building the Application
• When creating a new application, you will need to tell the application the path to your services-config.xml configuration path– You can copy this from your production
server, if you wish. It is only a config file.
Building the Application
• We will be using two new components:– <mx:Producer>
• ‘Sends’ data to the destination. Anything you send out there gets sent out to others.
– <mx:Consumer>• ‘Reads’ data from the destination. By default, it
takes in all data that is available at the destination. You can subscribe to ‘topics’
Sub-topics
• You can also setup “sub-topics” where your client only subscribes to a sub-set of the general chatter.– Also, can be used in a chatting app. – Topics use a hierarchal setup, allowing you to
subscribe at any level.
chatroom.MyRoom“IRC”
destination
Private.usernameChatroom.MyRoom
Client is only subscribed to Chatroom.MyRoom
Building the Application
<Demo>
Resources
• http://www.flex.org/
• http://www.adobe.com/devnet/flex/
• FlexCamp Online– http://www.flex.org/camp
• Any other questions?
• Part 2 of LDS during the October meeting!