Published on

An overview of the BlazeDS, an open source data services model.

Published in: Economy & Finance, Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 2. “ I am a Dumb developer”
  2. 3. Things to know! <ul><li>Data Connectivity </li></ul><ul><li>Role of LCDS </li></ul><ul><li>Data Management </li></ul><ul><li>Web Service </li></ul><ul><li>Remote Service ( RPC ?) </li></ul><ul><li>Proxy Service </li></ul><ul><li>JMS (pub-sub model) </li></ul><ul><li>What’s that “I” in RIA? </li></ul>
  3. 4. Game begins! <ul><li>What is BlazeDS? </li></ul><ul><ul><li>Java remoting and Messaging Technology. </li></ul></ul><ul><ul><li>Enables developers to connect to back-end distributed data and push data in real-time to Adobe Flex and Adobe AIR applications </li></ul></ul><ul><ul><li>Open Source </li></ul></ul><ul><ul><li>From SOAP to AMF (Action Message Format) </li></ul></ul><ul><ul><li>10 times faster than XML based protocols, how? </li></ul></ul><ul><ul><li>Previously known as Adobe LCDS </li></ul></ul>
  4. 5. Interaction with RPC
  5. 6. Using RPC components <ul><li>Instead of Contacting services, RPC components contact “Destinations” </li></ul><ul><li>Destination: Manageable Service Endpoints </li></ul><ul><li>Managed using XML based configuration file </li></ul><ul><li>“ Remote Object” not possible without BlazeDS </li></ul><ul><li>Adobe Flash Player blocks request to any external hosts, solution? </li></ul>
  6. 7. Understanding RPC <ul><li>Crossdomain.xml required ( For apps that are not using BlazeDS ) </li></ul><ul><li>XML file that indicates </li></ul><ul><ul><li>Data and documents are available to SWF files served from certain/all domains </li></ul></ul><ul><ul><li>Must be in “web root” of the server </li></ul></ul>
  7. 8. AMF – “10 times faster” <ul><li>Compact binary format for data serialization/ deserialization and remote method invocation. </li></ul><ul><li>Object encoding controls how objects are represented in Action Message Format (AMF). </li></ul><ul><li>Representation that can be transferred over HTTP/HTTPS. </li></ul><ul><li>As data size increases the performance benefits of using BlazeDS increase exponentially.  </li></ul>
  8. 9. Fast, How? <ul><li>AMF improves performance by </li></ul><ul><ul><li>Dramatically compressing the size of data transferred. </li></ul></ul><ul><ul><li>Parsing binary data into objects in memory far more efficiently than parsing XML data. </li></ul></ul>
  9. 10. Quick Brief <ul><li>Message Agents </li></ul><ul><ul><li>Message Producers & Consumers </li></ul></ul><ul><ul><li>Exchange messages through a common destination </li></ul></ul><ul><li>Channel and endpoints </li></ul><ul><ul><li>Formats, Translates messages into network-specific form. </li></ul></ul><ul><ul><li>Delivers to the endpoint (on the server) </li></ul></ul><ul><ul><li>Server-Side Channel Unmarshals messages </li></ul></ul><ul><ul><li>Configuration settings ( XML files) at runtime </li></ul></ul><ul><li>Message Broker </li></ul><ul><ul><li>Routes messages to the appropriate service based on its type </li></ul></ul><ul><li>Channel Types </li></ul>
  10. 11. Configuration file <ul><li>Channel Configuration </li></ul><ul><ul><li>Configure channels using services-config.xml </li></ul></ul><ul><ul><li>AMF protocol use an optimization technique </li></ul></ul><ul><ul><li>Assign channel at runtime( AS Code) by creating a ChannelSet object, and adding a channel to it. </li></ul></ul><ul><ul><ul><li>Var cs:ChannelSet = new ChannelSet(); </li></ul></ul></ul><ul><ul><ul><li>Var channel:Channel = new AMFChannel(“name”, endpoint) </li></ul></ul></ul><ul><ul><ul><li>cs.addChannel(channel); </li></ul></ul></ul><ul><ul><ul><li>Remoteobject.channelSet = cs; </li></ul></ul></ul>
  11. 12. Remote Object component <ul><li>Access methods of server-side java objects. </li></ul><ul><li>No need to specify 0bjects as operations in web services </li></ul><ul><li>Use RemoteObject component in MXML/AS </li></ul><ul><li>Server - Proxied access to an RPC service </li></ul><ul><li>Communication happens over a “destination” </li></ul><ul><li>Configured in the remoting-config.xml </li></ul><ul><ul><li>RPC method or URL, channel, adapter </li></ul></ul><ul><li>Asynchronous communication </li></ul><ul><ul><li>AsyncToken object </li></ul></ul>
  12. 13. Configure other Service <ul><li>Http Service and web service use proxy-service.xml </li></ul><ul><ul><li>Limit access to specific URL </li></ul></ul><ul><ul><li>Provide Security </li></ul></ul>
  13. 14. Things overlooked <ul><li>How adapters are created? </li></ul><ul><li>How serialization happens between AS and Java? </li></ul><ul><li>How to pass parameters to remote objects? </li></ul><ul><ul><li>Use <mx:method> </li></ul></ul><ul><li>How is data polled? </li></ul><ul><ul><li>Long Polling </li></ul></ul><ul><ul><li>Polling </li></ul></ul><ul><ul><li>Real-time polling </li></ul></ul>
  14. 15. Configuring BlazeDS <ul><li>Tomcat </li></ul><ul><ul><li>Unzip the blazeds-turnkey file on to your C: drive </li></ul></ul><ul><ul><li>Blazeds comes with Tomcat default. </li></ul></ul><ul><ul><li>Create a new application: C:lazeds omcatwebapps </li></ul></ul><ul><ul><li>Copy & paste the META-INF, WEB-INF folder from the samples (zip) file. </li></ul></ul><ul><ul><li>Store all your java class files in WEB-INF/classes folder </li></ul></ul><ul><ul><li>Configure remoting-config.xml under WEB-INF/flex/ for all your remoting related details (destinations) </li></ul></ul><ul><ul><ul><li>Create a <property/> and a specify a <source/> </li></ul></ul></ul><ul><ul><li>Configure messaging-config.xml under WEB-INF/flex for all your messaging (real-time) by adding your destination </li></ul></ul><ul><ul><li>For all other service related details use the proxy-config.xml </li></ul></ul><ul><ul><li>Give references of all these xml files in services-config.xml (done by default) </li></ul></ul><ul><ul><li>Run your application http://<localhost/ip>:<portno>/<appname> </li></ul></ul>
  15. 16. Configure BlazeDS with Jboss <ul><li>Create a new project : {jboss_root}/server/default/deploy </li></ul><ul><ul><li>Put your war/ear/sar folder here or create a folder with “.war” type </li></ul></ul><ul><ul><li>Include the META-INF & WEB-INF folder in the war </li></ul></ul><ul><ul><li>Restart your server if it does not “Hot deploy” </li></ul></ul><ul><ul><li>Run your application http://<localhost/ip>:<portno>/<appname> </li></ul></ul>
  16. 17. Hmmm… I don’t remember anything?? Questions?