XAJA - Reverse AJAX framework

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

  • + Guccigucci Guccigucci 3 months ago
    Also worth checking out a commercial push server which uses reverse ajax such as StreamHub http://www.stream-hub.com . There is also a free community edition - seems pretty good
Post a comment
Embed Video
Edit your comment Cancel

1 Favorite

XAJA - Reverse AJAX framework - Presentation Transcript

  1. DAVID NEGRIER Chief Technical Officer THE CODING MACHINE [email_address] http://www.thecodingmachine.com/projects/xaja
  2. THE XAJA MACHINE in four points
  3. Reverse & refresh
  4. PART 2
  5. Reverse Ajax Reverse Ajax is the ability to push data instantly from a web server to the user's browser, without user interaction. In order to establish a 2 ways data link, the Reverse Ajax technique (also known as Comet) tricks the browser by making several requests, one of which is answered very slowly.
  6. How XAJA works ? In PHP, there is no standard equivalent of the Java Message System. This is why Xaja comes with its own Message Broker . Xaja's message broker is a process that should be started when the server is started. The message broker can listen to clients on two kind of sockets: TCP sockets or IPC sockets. A message broker and a long-lived process are enough to implement efficient Reverse Ajax applications. However, this is not exactly easy. For each page, the developer must develop several PHP scripts. Xaja makes this process easy by providing the XajaController .
  7. Leveraging the power of the long-lived processes
    • In Xaja, the XajaController keeps the state of the whole document that is sent to the browser. Xaja does this through an output buffer (using PHP's obstart () function).
    • Xaja parses the document and stores the document in the XajaController. The DOM is stored on the server side. When the developers modifies the DOM on the server side, changes are automatically pushed to the browser.
    • Furthermore, Xaja applies some transformations to the XML. For instance, it provides a number of new tags and a number of new attributes on standard HTML tags that makes development really easier.
  8. PART 3
  9. Main points
    • These are only a subset of the features provided by Xaja.
    Claim Control Of Your Browser! Access Widgets $xajaController->getWidgetById() will return an HTML node Remove Content $widget->removeChildren() will remove children HTML nodes Use the pencil $xajaController->setPencil() will set the pencil in position Use Scriptaculous $widget->pulsate() … or any other Scriptaculous effect! Use the Message Broker to Push Data to Other Processes! Send a message $xajaController->sendMessageToBroker() sends messages Listen for messages $xajaController->addListener() will listen for messages Set the callback $xajaController->setCallBackOnMessage() sets the callback Use event handlers attributes Use custom attributes phponclick, phpvalue or any other Xaja special attribute contains directly PHP code.
  10. Performance impacts on the server side
    • A server running Xaja must run a Broker process. Furthermore, for each client, the server runs 2 long-lived processes.
    • Therefore, an application with 100 concurrent users will start 201 concurrent processes!
    • Hopefully, the “ copy-on-write ” mechanism of the Operating Systems prevents the OS from reloading the whole PHP program each time a process is launched.
    Memory consumption Broker 11 Mo 1 user 4,2 Mo 10 user 42 Mo Tests performed on the memory consumption of the sample Address Book application show that a user consumes on average 4,2 Mo of RAM, for both long-lived processes. Xaja is still in early development stage and no test has been done yet to see the impact of the increase number of processes on the performances. However, we can already say that Xaja behaves correctly with 10 concurrent users.
  11. What’s coming next?
    • Xaja is still in early development and a lot of features need to be added.
    • In the coming monthes, we plan to add:
    • Compatibility with Safari and Opera
    • Several useful tags, including menus, self-validating textboxes, auto-complete controls, trees, drag’n’drop, sliders and all the cool stuff that we got used to!
    • Reverse Data Sources and Reverse Datagrids!
    • Just imagine you could write something like this:
    • <?php
    • $reverse_ds = new ReverseSQLDataSource(“SELECT * FROM users”);
    • ?>
    • <datagrid datasource=“$reverse_ds” />
    • Xaja will reach its goal if it brings pervasive reverse ajax : reverse ajax everywhere, with no need to develop additional code .
  12. Conclusion
    • By leveraging the power of Reverse Ajax, Xaja does not only provide a push mechanism on the browser.
    • It also completely reverses the way a developer should think about its application and the way applications are designed. It also enables the developer to be much more efficient by using custom tags and attributes.
    • We release Xaja as an Open Source library with the hope that many developers will be interested and will come and help us adding features to it.
    • So if you want to enrich Xaja with a new killer tag, if you want to help us improving it by reporting bugs or patches, or if you want to perform a complete performance test, please contact us and join the team!
SlideShare Zeitgeist 2009

+ Sri PrasannaSri Prasanna Nominate

custom

1664 views, 1 favs, 0 embeds more stats

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 1664
    • 1664 on SlideShare
    • 0 from embeds
  • Comments 1
  • Favorites 1
  • Downloads 8
Most viewed embeds

more

All embeds

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories