Discussions

Industry news: Lightstreamer and AJAX

  1. Lightstreamer and AJAX (1 messages)

    We have recently received many enquiries regarding the relation between Lightstreamer and AJAX. In this post I try to summarize the main concepts.

    Lightstreamer is a Java push engine that streams real-time data to an HTML browser without the need to download or install anything on the client. Furthermore it implements bandwidth control techniques and adaptive streaming.

    AJAX (Asynchronous JavaScript and XML) is a term describing a web development technique for creating interactive web applications using a combination of HTML (or XHTML), CSS, DOM, XML, XSLT and the XMLHttpRequest object.

    AJAX, when used to update the data displayed in a page, is basically a polling technique. It does not support streaming and needs to periodically make an enquiry to the server both to know if fresh data is available and then to retrieve it. The following table summarizes the different paradigms involved in traditional web applications, AJAX applications and Lightstreamer applications:

    Traditional web applications
       Data delivery mode with respect to the user: synchronous
       Data delivery mode with respect to the browser: synchronous

    AJAX applications
       Data delivery mode with respect to the user: asynchronous
       Data delivery mode with respect to the browser: synchronous

    Lightstreamer applications
       Data delivery mode with respect to the user: asynchronous
       Data delivery mode with respect to the browser: asynchronous

    AJAX applications can update the data displayed in a page without the user having to explicitly request it (the data delivery is asynchronous with respect to the user). But the AJAX engine has to retrieve the data from the server in a synchronous fashion. On the other hand, Lightstreamer applications are fully asynchronous, because when new data is available, it is pushed by the server to the client. The main advantages of a full asynchronous approach based on streaming/push are:

    - Zero latency between the generation of new data and its delivery to the final client. No polling period has to be waited to see fresh data, so that high-frequency real-time solutions are possible.
    - Very small bandwidth usage. A permanent stream connection is kept open for each client. When no fresh data is published on the server, then no unnecessary traffic is generated (except for low-frequency and small-size keep-alive packets). With a polling approach, the traffic is generated even when the data is not changing.
    - Very low load on the infrastructure. The permanent stream connections are handled in a lightweight way by the browsers, by the proxy servers and by the Lightstreamer servers. On the contrary, a polling approach needs to generate many request/response interactions, that impact on client, proxy and server resources.

    Nevertheless Lightstreamer does support polling mode as well (from version 3.1). Should there be a case where a component in the network infrastructure exists that blocks the streaming traffic, Lightstreamer automatically switches to polling mode as a back-up. This situation highlights another difference with AJAX, where AJAX implementations usually rely on the XMLHttpRequest object to retrieve the data, but such an object is not available on all browsers (unless quite recent), and in some cases can create security issues. Lightstreamer instead leverages hidden frame downloads to retrieve data, a technique that is supported on any browser.

    The asynchronous data delivery (push/streaming) of Lightstreamer combined with its JavaScript libraries makes it possible to write RIA solutions without using Java applets and Flash components. Besides updating single cells displayed in a page, it is possible to plot real-time charts in pure HTML and to dynamically manage HTML tables on client side (on-the-fly creation and destruction of rows; real-time sorting on columns; split of lists on more pages).
    To check out some online demos go to www.lightstreamer.com/demos.htm.
  2. AJAX is wrong name for particulary methodology of creating web apps, but yours methodology perfectly falls in that is mistakedly (althougth widely) referenced as *AJAX*.
    So you has yet another (may be smart/clever enough) implementation of so called AJAX engine!

    If you trying to say that you have created something different in concept then ok. It is just PR.

    PS. Demos are pretty exciting!