AJAX Longpolling with ColdFusion 9 and BlazeDS

Comments

There aren't any comments for this presentation.

Add Comment

Comments have been closed.

Transcript

no image

Slide Text

Slide Notes


Slide 1



AJAX Longpolling
With ColdFusion 9 and BlazeDS
How to get started

no notes exist for this slide

Slide 2


AJAX Longpolling
with ColdFusion 9 and BlazeDS
Stephen Moretti
Software Development Manager
Enigma Interactive Ltd
http://www.enigma-interactive.co.uk

ColdFusion Developer since 1997 Employed, Self-employed and back to being Employed. Involved in helping to run most of the UK ColdFusion User Groups over the years

Slide 3


What am I talking about?
Quick introduction to Longpolling
How to set up a BlazeDS connection
Setting up the client and sending messages to the server
Sending messages to the client
Simple “chat” application

no notes exist for this slide

Slide 4


Why Longpolling?
Refresh on reload
No timely response
Traditional polling
overhead of many hits to your web server and application
Push servers
Additional servers required
Specific clients such as java applets to manage connections

Push Services only relatively recently became more accessible with the likes of PusherApp, Beacon, Kwikka and access to those services with javascript

Slide 5

no text exists for this slide

no notes exist for this slide

Slide 6


Why Longpolling?
Longpolling
Single connection held open for a long time before being closed or given some data.
Can be implemented using a standard webserver
Not recommend – ties up worker threads leaving server unable to serve at all.
BlazeDS uses amf for communication
Generally faster than XML or JSON

no notes exist for this slide

Slide 7

no text exists for this slide

no notes exist for this slide

Slide 8


What do we need?
ColdFusion 9
BlazeDS
Flex/AJAX Bridge

no notes exist for this slide

Slide 9


Setting up BlazeDS
BlazeDS configuration under ColdFusion 9
Channel/Endpoint configuration
{installpath}\JRun4\servers\{servername}\cfusion-ear\cfusion-war\WEB-INF\flex\services-config.xml
Event Gateway
Gateway handler
Gateway instance

no notes exist for this slide

Slide 10


Connecting
BlazeDS Resources
http://opensource.adobe.com/svn/opensource/blazeds/branches/3.x/resources/fds-ajax-bridge/
Flex/Ajax Bridge – FABridge
Messaging Service library
Bridge Library
FABridge SWF

no notes exist for this slide

Slide 11


Messaging
Destination
Messaging-config.xml
Dynamic destination configuration
Producers
Allow you to send to the server
Consumers
Allow you to listen for messages

no notes exist for this slide

Slide 12


Message Filtering
Selectors
Single value
Subtopics
Delimited topics or events
user.app.hello

no notes exist for this slide

Slide 13


Contact Me
Stephen Moretti
Email/IM : Stephen.Moretti@gmail.com
Blog : http://nil.checksite.co.uk
Twitter : @mr_nil

no notes exist for this slide

Slide 14


A bunch of links
http://blog.programmableweb.com/2010/09/14/client-push-services-open-up-real-time-to-everyone/
http://www.dcooper.org/blog/client/index.cfm?mode=entry&entry=8E1439AD-4E22-1671-58710DD528E9C2E7
http://www.codfusion.com/blog/page.cfm/articles/introduction-to-blazeds
http://opensource.adobe.com/wiki/display/blazeds/Developer+Documentation
http://stackoverflow.com/questions/333664/simple-long-polling-example-code
http://nil.checksite.co.uk/index.cfm/BlazeDS

no notes exist for this slide