Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

20
Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University

Transcript of Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

Page 1: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

Introduction to LiveCycle Data Services

Nick Kwiatkowski

Michigan State University

Page 2: 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.

Page 3: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

The Middleware

Brow

ser

Flex or AJAXapplication

AIRApplication

LiveCycle DS

Java

ColdFusion

.NET

Data

Presentation Layer Business Layer Data-Access Layer

PHP

Page 4: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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.

Page 5: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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.

Page 6: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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

Page 7: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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/

Page 8: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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

Page 9: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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

Page 10: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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

Page 11: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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

Page 12: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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

Page 13: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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

Page 14: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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

Page 15: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

Configuration

Page 16: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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.

Page 17: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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’

Page 18: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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

Page 19: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

Building the Application

<Demo>

Page 20: Introduction to LiveCycle Data Services Nick Kwiatkowski Michigan State University.

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!