Featured Demos
Stock-List Demo
Run     Learn more...
Bandwidth and Frequency Demo
Run     Learn more...
Portfolio Demo
Run     Learn more...
Chat Demo
Run     Learn more...
Round-Trip Demo
Run     Learn more...
3D World Demo
Run     Learn more...
Monitor Console Demo
Run     Learn more...
Web Telemetry Demo
Run     Learn more...
RSS News Reader Demo
Run     Learn more...
AngularJS Demo
Run     Learn more...
JQuery Grid Demo
Run     Learn more...
GWT Demo
Run     Learn more...
Dojo Toolkit Demo
Run     Learn more...
TIBCO GI Demo
Run     Learn more...
ASP.NET AJAX Demo
Run     Learn more...
Android Stock-List Demo
Run     Learn more...
iPhone & iPad SL Demo
Run     Learn more...
BlackBerry SL+RT Demo
Run     Learn more...
WP7 SL Demo
Run     Learn more...
Midlet SL + RT Demo
Run     Learn more...
Swing Stock-List Demo
Run     Learn more...
.NET Stock-List Demo
Run     Learn more...
Flash Stock-List Demo
Run     Learn more...
Flex Stock-List Demo
Run     Learn more...
Air Stock-List Demo
Run     Learn more...
Flex Portfolio Demo
Run     Learn more...
Silverlight SL Demo
Run     Learn more...
.NET Stock-List Demo
Run     Learn more...
WinRT Stock-List Demo
Run     Learn more...
DDE Stock-List Demo
Run     Learn more...
RTD Stock-List Demo
Run     Learn more...
Other Demos
- Basic Stock-List Demo
- Framed Stock-List Demo
- Simple Grid Demo
- Chart Demo
- Basic Portfolio Demo
- Drop-Down Demo
- Basic Instant Messenger Demo
- Dojo Toolkit :: Portfolio Demo
- TIBCO General Interface :: Stock-List Demo
- Flash Bridge :: Basic Demo
Demo Details Below is the detailed information on each demo.
 

Please bear in mind that these demos are not intended to show full-blown applications, but to focus on specific aspects of Lightstreamer with a didactic purpose. For this reason, they are kept extremely simple. All of the demos work without an application server. In other words, they are so simple that they don't need any server-side logic, except for the Lightstreamer Adapters. Even the HTML front-ends are completely static (not generated through JSP, ASP, PHP, etc.).

 
HTML and JAVASCRIPT
This demo displays real-time market data for ten stocks, generated by a feed simulator.

This page uses the JavaScript Client API for Lightstreamer to handle the communications with Lightstreamer Server. A simple user interface is implemented to display the real-time data received from Lightstreamer Server. The front-end code is kept extremely simple and represents a good introduction to Lightstreamer subscription management. In particular, the client code can be considered as a reference example of item subscriptions in MERGE mode.

Client Side:

Adapters involved:
  • QUOTE_ADAPTER: a sample Data Adapter generating random market data.
  • LiteralBasedProvider: a sample Metadata Adapter that can be used out-of-the-box for many types of applications.

Client source code:
     : Lightstreamer StockList Demo Client for JavaScript

QUOTE_ADAPTER source code:
- Java version:
     : Lightstreamer StockList Demo Adapter
- Java-with-JMS version (folder of Lightstreamer distribution):
   DOCS-SDKs/sdk_adapter_java/examples/StockListDemo_JMS_DataAdapter
- C#.NET version (folders of Lightstreamer distribution):
     : Lightstreamer StockList Demo Adapter for .NET

LiteralBasedProvider source code:
- Java version:
     : Lightstreamer Reusable Metadata Adapter in Java
- C#.NET version:
     : Lightstreamer StockList Demo Adapter for .NET
This demo shows some further features with respect to the Basic Stock-List Demo.

Click on the stock names to open pop-up windows that display real-time streaming charts. Notice that the maximum update frequency set for the pop-up windows is greater than the frequency set for the main window. The data is resampled by Lightstreamer Server according to the maximum frequency requested by each table (you can easily notice that if you open "Ations Europe").

Click on the link under the table (Next/Previous 15) to dynamically switch between two lists of fifteen items, without losing previously opened pop-ups. If you open the same demo in different browser windows, you will see slightly different values for the most updated stocks. Again, this behavior shows how the data resampling is done in real-time on a per-window basis.

Notice that a large portion of the JavaScript front-end code is devoted to client-side formatting operations.

Client Side:

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for JavaScript
The same as the Stock-List Demo, but with a different architecture for the LightstreamerClient integration. A LightstreamerClient object is always kept alive in a hidden page. For an explanation of the different deployment strategies please refer to the "JavaScript Client Guide.pdf" document.

Client Side:

Adapters involved:

Client source code (folder of Lightstreamer distribution):
     : Lightstreamer StockList Demo Client for JavaScript
The Bandwidth and Frequency Demo demonstrates two important features of Lightstreamer: bandwidth management and frequency management.

Use the Max Bandwidth slider to dynamically change the maximum bandwidth granted to for the current session. The client will notify the server of the new bandwidth and the server will change the update frequency on the fly, in order to respect the bandwidth limit.
You can see that with a bandwidth as ridiculous as 0.5 kilobits per seconds, Lightstreamer is still able to deliver updates to the page, thanks to the very optimized network protocol used.

Use the Max Frequency slider to dynamically change the maximum update rate of each item in the Subscription. The client will notify the server of the new frequency limit and the server will change the update frequency on the fly, in order to respect the frequency limit.

You can see how the bandwidth and frequency constraints act on different levels. The bandwidth constraint is applied to the whole session, that is, to the global update flow for this page. On the other hand, the frequency constraint is applied to each row (Item) individually. Both the constraints set an upper bound, which is dynamically managed by Lightstreamer Server.

Note that thanks to MERGE mode, the updates are not queued and delayed, but resampled and conflated. In other words, when an item has a chance to be updated (based on a round-robin algorithm), it will receive the very latest state available, not an old one.

Click on the link under the table (Next/Previous 15) to dynamically switch between two lists of fifteen items and see how the initial snapshot is loaded still respecting the bandwidth limit.

Client Side:
  • Two Subscriptions containing 15 items each, subscribed to in MERGE mode feeding a DynaGrid alternately according to the selected list.

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for JavaScript
This demo shows how it is possible to build a "dynamic-subscription grid" by leveraging a Lightstreamer DynaGrid.

The 30 items of the Stock-List Demo are virtually contained in the grid, but only 5 at a time are displayed. The slider to the right implements a virtual scroll bar. When the table is scrolled, the invisible items are unsubscribed from and the new visible items are subscribed to. To accomplish this, each Lightstreamer Subscription contains one item only and each row on the DynaGrid is fed by a different Lightstreamer Subscription: the granularity of subscriptions and unsubscriptions is at the row level.

This technique enables to handle visual grids containing thousands of items with a very low impact on both the client side and the server side.

Client Side:
  • A Subscription for each visible row, containing 1 item, subscribed to in MERGE mode. All of the Subscriptions feed the same DynaGrid .

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for JavaScript
This demo shows the capability of Lightstreamer to plot some simple real-time streaming charts in pure HTML and JavaScript. This feature is also demonstrated in the pop-up windows of the Stock-List Demo. For more sophisticated charts, it is possible to use third-party charting libraries.

In this chart, the prices for two stocks are normalized to 100 and plotted.

Client Side:

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for JavaScript
In the Basic Portfolio Demo, a virtual stock portfolio, shared among all the connected users, is displayed.
By using the "Submit Order" panel, you can buy or sell a stock (identified by an item number), filling in the Quantity field and pressing the proper button.
Click on the column headers to sort the grid on different columns.
The portfolio grid is updated in push mode, for both the columns and the rows (this is the so called "metapush" feature).

This portfolio is shared among all the connected users, so you can connect to this demo from different machines (or try at least different browsers on the same machine), then submit orders from one browser and see the updates displayed on another browser.

The front-end code can be considered a reference example of item subscriptions in COMMAND mode.

Client Side:
  • A Subscription containing 1 item, subscribed to in COMMAND mode feeding a DynaGrid. Each row of the grid is identified by a unique key. For didactic purpose, this example displays the command and key fields, which are usually hidden.
  • The order submission is done by sending a message directly to Lightstreamer Server using the LightstreamerClient.sendMessage utility.

Adapters involved:
  • PORTFOLIO_ADAPTER: a sample Data Adapter that manages a simulated stock portfolio.
  • PortfolioMetadataAdapter: a simple Metadata Adapter that inherits from LiteralBasedProvider. It plays the extra-role of receiving order submissions from the clients and forwarding them to the Data Adapter.

Client source code (folder of Lightstreamer distribution):
     : Lightstreamer Portfolio Demo Client for JavaScript

PORTFOLIO_ADAPTER source code:
- Java version:
     : Lightstreamer Portfolio Demo Adapter
- C#.NET version (folders of Lightstreamer distribution):
   DOCS-SDKs/sdk_adapter_dotnet/examples/Remote_Portfolio_Adapters/
   src_adapters

PortfolioMetadataAdapter source code:
- Java version:
     : Lightstreamer Portfolio Demo Adapter
- C#.NET version (folders of Lightstreamer distribution):
   DOCS-SDKs/sdk_adapter_dotnet/examples/Remote_Portfolio_Adapters/
   src_adapters
This demo application extends the Basic Portfolio Demo by combining live stock prices (as in the Stock-List Demos) with the portfolio contents.

The columns show: stock name, last price, quantity (number of stocks in the portfolio), countervalue (=price*quantity), time of last price.

The portfolio content is the same as the Basic Portfolio Demo (i.e. it subscribes to the same item from the same Data Adapter) and it is shared among all the connected users. Again, you can connect to this demo from different machines and see your operations propagated everywhere.

The front-end code can be considered a reference example of item subscriptions in COMMAND mode with "two-level push".

Compared to the Basic Portfolio Demo a panel has been added to display information about the submission of orders. It displays your orders only and not those submitted by other connected users. The columns show: progressive number of order, stock name, type of order (buy or sell), quantity, and status of order (SUBMITTING, PROCESSED, ABORT, DENY, DISCARDED, ERROR).

Client Side:
  • A Subscription containing 1 item, subscribed to in COMMAND mode feeding a DynaGrid. Each added row automatically provokes an underlying subscription to a sub-item in MERGE mode, to get the real-time price for that specific stock from another feed (the same as the Stock-List Demos). When a row is deleted, the underlying sub-item is automatically unsubscribed from.
  • The order submission is done by sending a message directly to Lightstreamer Server using the LightstreamerClient.sendMessage utility.
  • A DynaGrid is fed dynamically with one row for each sendMessage invocation and updated via an appropriate ClientMessageListener.

Adapters involved:

Client source code:
     : Lightstreamer Portfolio Demo Client for JavaScript
This demo application shows a changeable list of items within a normal HTML drop-down menu. The contents of the list change in real time, based on the commands pushed by the Server.

The feed that controls the list contents is the same as in the Portfolio Demos (i.e. it subscribes to the same item from the same Data Adapter) and it is shared among all the connected users. So, you can see the drop-down menu kept in sync across all the browsers connected to this page.

The front-end code can be considered a reference example of visualization of data, coming from an item subscription, that does not leverage the Lightstreamer widgets, but uses custom HTML code or third-party widgets.

Client Side:
  • A Subscription containing 1 item, subscribed to in COMMAND mode. Each time the Server sends an "add" or "delete" command, the JavaScript code manipulates the drop-down menu to update its contents.

Adapters involved:

Client source code (folder of Lightstreamer distribution):
     : Lightstreamer Portfolio Demo Client for JavaScript
The Basic Chat Demo implements an extremely simple chat application, where all the users connected to the page can exchange messages. Each message reports the originating IP address, together with the user-agent string of the originating client, instead of leveraging a nick name.

Launch multiple instances of the demo, possibly on different machines, to appreciate the message broadcast capability.

The front-end code can be considered a reference example of item subscriptions in DISTINCT mode.

Note: When you publish a value your IP address is publicly displayed.

Client Side:

Adapters involved:
  • CHAT_ROOM: a sample Data Adapter that publishes messages on an item.
  • ChatMetadataAdapter: a simple Metadata Adapter that inherits from LiteralBasedProvider. It plays the extra-role of receiving messages from the clients and forwarding them to the Data Adapter.

Client source code:
     : Lightstreamer Chat Demo Client for JavaScript

CHAT_ROOM source code:
- Java version:
     : Lightstreamer Chat Demo Adapter for Java
- Node.js version:
     : Lightstreamer Chat Demo Adapter for Node

ChatMetadataAdapter source code:
- Java version:
     : Lightstreamer Chat Demo Adapter for Java
The Basic Instant Messenger Demo shows an extremely simple version of a typical messenger, where messages can be delivered to a specific friend, chosen from a dynamic list of online buddies.

Choose a nick-name and click Login. You will see a list of all users connected to this demo, with their nicknames. Write a message and choose a recipient. The message will be delivered only to him/her (rather than broadcasting it, as the Basic Chat Demo does).

Launch multiple instances of the demo, possibly on different machines, to populate the Buddies list. If you use the same nick-name on different instances, you will actually embody the same identity (to keep things simple, no authentication is used).

The front-end code can be considered a reference example of one-to-one messaging. Each user subscribes to their personal item (corresponding to the nick-name), so that messages can be routed properly, instead of begin broadcast (as in the Basic Chat Demo, where all the users subscribe to the same item). In real applications, where authentication is used, the Metadata Adapter should enforce the association between the user's identity and the item they have the right to subscribe to.

Client Side:

Adapters involved:
  • SIMPLE_MESSENGER: a sample Data Adapter that manages the personal users' items and the item dedicated to the buddy list.
  • IMMetadataAdapter: a simple Metadata Adapter that inherits from LiteralBasedProvider. It plays the extra-role of receiving messages from the clients and forwarding them to the Data Adapter.

Client source code:
     : Lightstreamer Messenger Demo Client for JavaScript

SIMPLE_MESSENGER source code:
- Java version:
     : Lightstreamer Instant Messenger Demo Adapter for Java

IMMetadataAdapter source code:
- Java version:
     : Lightstreamer Instant Messenger Demo Adapter for Java
The Round-Trip Demo lets you broadcast messages as you type, character by character, to all the browsers displaying that page.

Type anything in the 5 fields. Your characters will be delivered to the server, which will send them back to all the browsers, including yours (in the bottom grid). Launch multiple instances of the demo, possibly on different browsers or different machines, to really appreciate the broadcast capabilities. You will type some text in a browser and see it appear in real time on another browser.

The grid to the bottom reports the originating IP address and the timestamp of the last change applied to each item.

Note: When you publish a value your IP address is publicly displayed.

Client Side:

Adapters involved:
  • ROUNDTRIP_ADAPTER: a Data Adapter that broadcasts the values of received from the Metadata Adapter for the 5 items in real time.
  • RoundTripMetadataAdapter: a simple Metadata Adapter that inherits from LiteralBasedProvider. It plays the extra-role of receiving messages from the clients and forwarding them to the Data Adapter.

Client source code:
     : Lightstreamer Round-Trip Demo Client for JavaScript

ROUNDTRIP_ADAPTER source code:
     : Lightstreamer Round-Trip Demo Adapter

RoundTripMetadataAdapter source code:
     : Lightstreamer Round-Trip Demo Adapter
The 3D World Demo shows how well the real-time positions of objects in a multiplayer 3D world can be delivered over WebSockets and HTTP via Lightstreamer Server. Several different controls are provided, to simulate any scenario of real-time synchronization.

For full instructions and explanation of this demo, please read the article: Optimizing Multiplayer 3D Game Synchronization Over the Web.

There are two ways the demo can work:
First way: the physics engine runs on the client side, which periodically synchronizes with the authoritative server.
Second way: the physics engine runs on the server side only and the positional and rotational data for all the players in a world are transmitted to all the clients. In other words, the clients are pure renderers.

Client Side:
  • A Subscription to an item in COMMAND mode, to get the list of players in a world, feeding a DynaGrid (for the matrix widget). Each added row automatically provokes an underlying subscription to a sub-item in MERGE mode, to get the real-time coordinates for that specific player. When a row is deleted, the underlying sub-item is automatically unsubscribed from.
  • For each player in a world,
  • a Subscription to an item in MERGE mode, with unlimited frequency, to receive the changes of the velocity vector and the angular momentum for all the objects in that world. These items are subscribed to only in client-side mode.
  • A Subscription to an item in DISTINCT mode, to implement presence (each player signals her presence by keeping this subscription; by closing the page, the automatic unsubscription determines the loss of presence).
  • A Subscription to an item in MERGE mode, to get the downstream bandwidth in real time.

Adapters involved:
  • DEMOMOVE3D: a Java Adapter implementing both the SmartDataProvider interface and the MetadataProviderAdapter interface to inject data into Lightstreamer server with real time information about the movement of every object in the world. Both translations and rotations in 3D space are calculated by the adapter and transmitted to the clients in a 7-value array: position for axis X, position for axis Y, position for axis Z, and a quaternion object for rotation information.

Client source code:
     : Lightstreamer 3D World Demo Client for JavaScript

DEMOMOVE3D adapter source code:
     : Lightstreamer 3D World Demo Adapter
This application shows a real-time monitor console. Several metrics are reported as they change on the server.

Client Side:
  • Three Subscriptions containing the items for the statistics, subscribed to in MERGE mode feeding three StaticGrids. Fields from a single item are associated to cells scattered in the page.
  • Three Subscriptions containing the items for the server logging, subscribed to in DISTINCT mode feeding three DynaGrids.

Adapters involved:
  • MONITOR: an internal Data Adapter that reports monitoring data on Lightstreamer Server itself. Of course, other monitoring applications will need their own Data Adapter.
  • MonitorDemo: a simple Metadata Adapter that inherits from LiteralBasedProvider.

Client source code:
     : Lightstreamer Monitor Demo Client for JavaScript

MONITOR source code:
- N/A (it is embedded in Lightstreamer Server)

MonitorDemo source code (folder of Lightstreamer distribution):
- Java version:
   DOCS-SDKs/sdk_adapter_java/examples/Monitor_MetadataAdapter
The Formula 1 Web Telemetry Demo shows how Lightstreamer can be used to send real-time telemetry data through the Web.

In this demo, the data is generated by a feed simulator. Actual feed adapters were created to deliver real data.

Client Side:
  • A Subscription containing 1 item, subscribed to in MERGE mode, with some of the metrics pertaining to the car, feeding a StaticGrid.
  • A Subscription containing 1 item, subscribed to in DISTINCT mode, with the data for each lap feeding a DynaGrid.
  • A Subscription containing 1 item (the same of the first Subscription but at a lower frequency), subscribed to in MERGE mode feeding two Charts, used to plot the speed and the engine RPM.

Adapters involved:
  • FORMULA1_ADAPTER: a Data Adapter that generates random data for the telemetry metrics of the car.
  • LiteralBasedProvider (see Basic Stock-List Demo).

Client source code:
     : Lightstreamer Race Telemetry Demo Client for JavaScript

FORMULA1_ADAPTER source code:
- N/A
The RSS News Reader Demo is a simple news aggregator that allows the user to subscribe to several RSS feeds and have the news pushed in real-time without refreshing the page or polling the server under the hood.

The demo starts with some feeds already subscribed to. You can add your own feeds or click on "+" to add random feeds.

Client Side:
  • A Subscription containing 1 item, subscribed to in DISTINCT mode feeding a DynaGrid containing the news.
  • A Subscription containing 1 item, subscribed to in COMMAND mode feeding a DynaGrid containing the list of feeds currently subscribed to.

Adapters involved:
  • RSS_ADAPTER: a Data Adapter that polls all the feeds currently subscribed to and delivers the updates to the Server. It also delivers the list of subscribed feeds for each user.
  • RSSMetadataAdapter: a simple Metadata Adapter that inherits from LiteralBasedProvider. It coordinates, together with the Data Adapter, the association among items, users, and subscribed feed.

Client source code (folder of Lightstreamer distribution):
     : Lightstreamer RSS Demo Client for JavaScript

RSS_ADAPTER source code:
     : Lightstreamer RSS Demo Adapter

RSSMetadataAdapter source code:
     : Lightstreamer RSS Demo Adapter
JAVASCRIPT LIBRARIES
This page uses the JavaScript Client API for Lightstreamer to handle the communications with Lightstreamer Server and uses AngularJS and ng-grid to display the real-time data pushed by Lightstreamer Server. A Lightstreamer Subscription is used for subscribing to the data. The onItemUpdate callback implementation acts as a bridge between Lightstreamer and AngularJS, by injecting the real-time into objects that are in turn used as models by AngularJS.

Click on the Name column header to resort the stocks in the table.

Client Side:
  • A Subscription containing 10 items, subscribed to in MERGE mode.

Adapters involved:

Client source code (Colosseo - using JavaScript client 6.0):
     : Lightstreamer StockList Demo Client for AngularJS
This page uses the JavaScript Client API for Lightstreamer to handle the communications with Lightstreamer Server and uses jqGrid to display the real-time data pushed by Lightstreamer Server. A Lightstreamer Subscription is used for subscribing to the data. The onItemUpdate callback implementation acts as a bridge between Lightstreamer and jqGrid, by injecting the real-time updates through the setRowData function.

Click on the Name column header to resort the stocks in the table.

Client Side:
  • A Subscription containing 10 items, subscribed to in MERGE mode.

Adapters involved:

Client source code (Duomo - using HTML client 5.0):
- download the zip file
Client source code (Colosseo - using JavaScript client 6.0):
     : Lightstreamer StockList Demo Client for jQuery
An integration demo of Lightstreamer and Google Web Toolkit (GWT).

This page uses the JavaScript Client API for Lightstreamer to handle the communications with Lightstreamer Server and uses a GWT FlexTable to display the real-time data pushed by Lightstreamer.

The LSGWTLightstreamerClient class wraps the LightstreamerClient object, which is the JavaScript class responsible for handling connections and subscriptions. The LSGWTSubscription class wraps the Subscription JavaScript class, which contains subscription details and the listeners needed to process the real-time data. It is an abstract class; its subclass LSGWTDemoTable extends its functionalities implementing the handling of the updates and publishing them to a GWT FlexTable.

Client Side:
  • A Subscription containing 10 items, subscribed to in MERGE mode.

Adapters involved:

Client source code (Duomo - using HTML client 5.0):
- download the zip file
Client source code (Colosseo - using JavaScript client 6.0):
     : Lightstreamer StockList Demo Client for Google Web Toolkit (GWT)
An integration demo of Lightstreamer and Dojo Toolkit.

This page uses the HTML Client API for Lightstreamer to handle the communications with Lightstreamer Server; uses the LightstreamerStore, a JavaScript interface based on the dojo.store APIs, as a bridge between Lightstreamer and Dojo APIs; and uses dGrid and dojox.charting.Chart to display the real-time data received from the Lightstreamer Server.

A detailed explanation of this application, the modules used and the integration approach is available.

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for Dojo
An integration demo of Lightstreamer and Dojo Toolkit.

This page uses the HTML Client API for Lightstreamer to handle the communications with Lightstreamer Server; uses the LightstreamerStore, a JavaScript interface based on the dojo.store APIs, as a bridge between Lightstreamer and Dojo APIs; and uses dGrid and dojox.charting.Chart to display the real-time data received from the Lightstreamer Server and a second dGrid to show the outcome of the sent orders.

Adapters involved:

Client source code:
     : Lightstreamer Portfolio Demo Client for Dojo
A demonstration of simple integration between Lightstreamer and TIBCO General Interface.

This application uses the JavaScript Client API for Lightstreamer to handle the communications with Lightstreamer Server and uses the General Interface API to display the real-time data.

In this application, five stock quotes are displayed in real time. The demo page contains two tables, both of which receive the real-time data flow from Lightstreamer Server. The table at the top is managed by the Lightstreamer JavaScript Client, though embedded inside GI. The table at the bottom is a GI table (in which you can drag, resize and sort columns) and is updated by the Lightstreamer Javascript Client. GI-based pop-up windows show the price charts produced by the Lightstreamer JavaScript Client.

Client Side:
  • A Subscription containing 10 items, subscribed to in MERGE mode feeding both a StaticGrid and the GI widget.
  • For each pop-up window opened, a Subscription containing 1 item, subscribed to in MERGE mode feeding a Chart.

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for TIBCO General Interface (GI)
This demo shows a complete integration between Lightstreamer and TIBCO General Interface.

This application uses the JavaScript Client API for Lightstreamer to handle the communications with Lightstreamer Server; uses PageBus as a bridge between Lightstreamer and General Interface APIs; and uses the General Interface API to display the real-time data.

The Lightstreamer client receives events from Lightstreamer Server and publishes the stock updates on TIBCO PageBus. The application, created with the GI Builder, subscribes to the PageBus in order to receive and display the updates to the user.

A detailed explanation of this application is available (in that document Lightstreamer is referred to as "Ajax Message Service").

Client Side:
  • A Subscription for each item added to the update panel, subscribed to in MERGE mode.

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for TIBCO General Interface (GI)
An integration demo of Lightstreamer and Microsoft ASP.NET AJAX.

This application uses the JavaScript Client API for Lightstreamer to handle the communications with Lightstreamer Server and uses an ASP.NET AJAX ReorderList to display the data for eight stock quotes received from Lightstreamer Server.

You can drag the blue handles to reorder the list. Click on the stock names to open pop-up boxes showing the streaming charts.

Client Side:
  • A Subscription for each of the eight stock quotes added to the update panel, subscribed to in MERGE mode feeding both a StaticGrid and, if opened, a Chart for the pop-up window.

Adapters involved:

Client source code:
- N/A
FLASH, FLEX, and AIR
This very simple demo uses the Flash Bridge to inject real-time data into two Flash movies hosted on the page. Each of the two movies subscribes to two items of the Stock-List Demos. The smaller movie sets a maximum update frequency of 1 event/sec.

The Flash app uses the ActionScript/JavaScript Bridge provided as part of the "sdk_client_flash". That means the ActionScript API, used within the Flash application, talks to external JavaScript code, in the form of the FlashBridge class, that in turn uses a LightstreamerClient instance to handle the communications with Lightstreamer Server.

Client Side:
  • A FlashTable containing 2 items, subscribed to in MERGE mode, for each Flash movie.

Adapters involved:

Client source code (folders of Lightstreamer distribution):
     : Lightstreamer StockList Demo Client for Flash
This is a Flash version of the Stock-List Demos, which displays eight stock quotes with some nice graphic effects.

The Flash app uses the ActionScript/JavaScript Bridge provided as part of the "sdk_client_flash". That means the ActionScript API, used within the Flash application, talks to external JavaScript code, in the form of the FlashBridge class, that in turn uses a LightstreamerClient instance to handle the communications with Lightstreamer Server.

Client Side:
  • A FlashTable containing 8 items, subscribed to in MERGE mode.

Adapters involved:

Client source code (folders of Lightstreamer distribution):
     : Lightstreamer StockList Demo Client for Flash
This is a Flex version of the Stock-List Demos, where ten items are subscribed to.

This app uses the Flex Client API for Lightstreamer to handle the communications with Lightstreamer Server and uses the Flex DataGrid to display the real-time data pushed by Lightstreamer Server.

The upper table shows the automatic binding of a Lightstreamer data table to a Flex widget (a DataGrid). You can sort on any columns and drag the columns around. The buttons to the right control the update highlight effects and can stop/start the subscription.

The lower table shows the direct use of pushed values to manually update a Flex widget (a TextArea). The buttons to the right can clear the TextArea and stop/start the subscription.

Tables involved:
  • A VisualTable containing 10 items, subscribed to in MERGE mode, bound to the Flex DataGrid.
  • A NonVisualTable containing 10 items, subscribed to in MERGE mode, used to get the events to write into the Flex TextArea.

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for Adobe Flex SDK
This is the AIR version of the Flex Demo.

Installation instructions:
  • Download and install Adobe AIR (if not already installed).
  • Click the "run the demo" button to download and install the application.

Tables involved:
  • A VisualTable containing 10 items, subscribed to in MERGE mode, bound to the Flex DataGrid.
  • A NonVisualTable containing 10 items, subscribed to in MERGE mode, used to get the events to write into the Flex TextArea.

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for Adobe Flex SDK
This is a Flex version of the Portfolio Demo, where a list of sent orders is kept and updated with the status of the request.

This app uses the Flex Client API for Lightstreamer to handle the communications with Lightstreamer Server and uses the Flex DataGrid to display the real-time data.

The left table shows the automatic binding of a Lightstreamer data table configured to exploit "two-level push" with a Flex widget (a DataGrid). You can sort on any columns and drag the columns around.

Using the form to the right, you can buy or sell a stock.
Clicking the "Random Orders" button, 20 random orders are placed in batch mode. Orders are placed through the LSClient.SendMessage method.

The DataGrid, below the orders form, mantains a list of executed orders and their statuses (PROCESSING, PROCESSED, ABORTED or ERROR). Such statuses are received by the demo code by listening for SendMessageAbortEvent, SendMessageErrorEvent, and SendMessageProcessedEvent events and then placed in an ArrayCollection that is in turn bound to the DataGrid.

This portfolio is shared among all the connected users, so you can connect to this demo from different machines (or try at least different browsers on the same machine), then submit orders from one browser and see the updates displayed on another browser. The same portfolio is also shared among the various versions of the demo (Flex and HTML).

Tables involved:
  • A VisualTable containing 1 item subscribed to in COMMAND mode. Each added row automatically provokes an underlying subscription to a sub-item in MERGE mode, to get the real-time price for that specific stock from another feed (the same as the Stock-List Demos). When a row is deleted, the underlying sub-item is automatically unsubscribed from.

Adapters involved:

Client source code:
     : Lightstreamer Portfolio Demo Client for Adobe Flex SDK
SILVERLIGHT
This is a Silverlight version of the Stock-List Demos, where thirty items are subscribed to.

This app uses the Silverlight Client API for Lightstreamer to handle the communications with Lightstreamer Server and uses a Silverlight Grid to display the real-time data pushed by Lightstreamer Server.

After launching the demo, the Silverlight application will automatically connect to Lightstreamer Server and will subscribe to 30 stock quotes.

A Silverlight Grid is used to display the real-time data. You can sort on any columns and drag the columns around (in this demo the resorting is not done automatically on each update).

Adapters involved:

Client source code :
     : Lightstreamer StockList Demo Client for Microsoft Silverlight
ANDROID
QR code with URL to Android Market
This is a Java-for-Android version of the Stock-List Demos.

This app uses the Android Client API for Lightstreamer to handle the communications with Lightstreamer Server. A simple user interface is implemented to display the real-time data received from Lightstreamer Server.

To install the app from the Android Market, you can use the QR code to the left or visit the corresponding Android Market page.

See the README.txt instructions contained the zip file with the source code (see below) to know more about the application logic and to learn how to compile the code.

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for Android
iOS
This app, compatible with both iPhone and iPad, is an Objective-C version of the Stock-List Demos.

This app uses the iOS Client API for Lightstreamer to handle the communications with Lightstreamer Server. A simple user interface is implemented to display the real-time data received from Lightstreamer Server.

To install the app from the iTunes Store you can either go to the iTunes Preview page and choose "View In iTunes", or open iTunes and search for "Lightstreamer".

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for iOS
BLACKBERRY
This BlackBerry application contains two different screens: one with three stock quotes from the Stock-List Demos, the other with four items from the Round-Trip Demo.

This app uses the BlackBerry Client API for Lightstreamer to handle the communications with Lightstreamer Server.

To install the application, click the "run the demo" button to download a ".jad" file to your phone. As an alternative, point your mobile browser directly to the URL: http://demos.lightstreamer.com/bb/lsbbdemo.jad

Once installed on your phone, run the application, give the requested rights, and wait for the connection to be established (as shown in the top green bar). If no connection can be established but your phone is connecting to the Internet properly for other applications, it probably means that the access point list configured in the demo is not compatible with your phone configuration. You might want to contact support@lightstreamer.com for further information.

When the Basic Stock-List Demo is connected, you will see the yellow flashing cells of the Stock-List Demos. Use the menu to switch to the other demo, where you can see the values of some items of the Round-Trip Demo updated in real-time. To publish new values, use the menu.

You can open the Round-Trip Demo on a PC browser and see the values synchronized with the mobile phone.

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for BlackBerry
WINDOWS PHONE
This is a Windows Phone version of the Stock-List Demos.

This app uses the Windows Phone Client API for Lightstreamer, based on Silverlight, to handle the communications with Lightstreamer Server. A simple user interface is implemented to display the real-time data received from Lightstreamer Server.

To install the app from the Windows Phone Marketplace, either click the "run the demo" button to the right from your Windows Phone, or go to the Marketplace and search for "Lightstreamer".

Adapters involved:

Client source code (folder of Lightstreamer distribution - Allegro+, Presto, Vivace):
     : Lightstreamer StockList Demo Client for Microsoft Windows Phone
JAVA ME
This Java midlet contains two different screens: one with three stock quotes from the Stock-List Demos, the other with four items from the Round-Trip Demo.

This app uses the Java ME Client API for Lightstreamer to handle the communications with Lightstreamer Server.

Click the "run the demo" button to download a MIDP 2.0 ".jad" file to your phone. As an alternative, point your mobile browser to the URL, to choose between .jad and .jar: http://www.lightstreamer.com/demo/midlet/

Once installed on your phone, run the midlet, allow the network connections, choose the access point id prompted, and wait for the connection to be established (as shown in the top green bar).

You will see the yellow flashing cells of the Stock-List Demos. Use the Option menu to switch to the other demo, where you can see the values of some items of the Round-Trip Demo updated in real-time. To publish new values, use the Option menu.

You can open the Round-Trip Demo on a PC browser and see the values synchronized with the mobile phone.

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for Java ME
JAVA SE
This is a Java Swing version of the Stock-List Demos, where thirty items are subscribed to.

This app uses the Java SE Client API for Lightstreamer to handle the communications with Lightstreamer Server. A simple user interface is implemented to display the real-time data received from Lightstreamer Server.

By clicking the "run the demo" button, a zip file containing the Java application and the launch scripts will be downloaded. Extract the files and use the launch script start_demo.bat or start_demo.sh.
You can sort on any columns and drag the columns around.

This application uses the "com.lightstreamer.ls_client" layer of the Lightstreamer Java SE client library to connect to Lightstreamer Server and subscribe to the 30 items. The application code implements auto-reconnection and auto-resubscription logic, together with a connection status indicator.
Java Swing classes are used to display the real-time updates received from Lightstreamer Server. The application code implements a cell highlighting mechanism too.

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for Java SE
.NET
This is a .NET version of the Stock-List Demos, where thirty items are subscribed to.

This app uses the .NET Client API for Lightstreamer to handle the communications with Lightstreamer Server. A simple user interface is implemented to display the real-time data received from Lightstreamer Server.

Installation instructions:
  • Click the "run the demo" button to download the application installer (a ".msi" file).
  • Execute the downloaded file to install the application (it is not digitally signed, but we guarantee it does not contain any malicious code).
  • Run the installed application.

The application uses a grid to display the real-time data. You can resize and drag the columns around.

To uninstall the application, go to the Windows Control Panel, choose the applet for managing installed programs ("Add or Remove Programs" or something similar, depending on Windows' versions), and select "Lightstreamer :: .NET Framework: Stock-List Demo".

Adapters involved:

Client source code:
     : Lightstreamer StockList Demo Client for .NET
WINRT
This is a WinRT (Windows Runtime for Windows 8) version of the Stock-List Demos.

This app uses the WinRT Client API for Lightstreamer to handle the communications with Lightstreamer Server. A simple user interface is implemented to display the real-time data received from Lightstreamer Server.

To install the app from the Windows Store, either click the "run the demo" button to the right from within Windows 8, or go to the store and search for "Lightstreamer".

Adapters involved:

Client source code (folder of Lightstreamer distribution - Allegro+, Presto, Vivace):
     : Lightstreamer StockList Demo Client for Microsoft WinRT
EXCEL
Dynamic Data Exchange (DDE) is a technology for communication between multiple applications under Microsoft Windows, often used for automatically filling a Microsoft Excel spreadsheet with data.

This Java application is basically a DDE bridge, which injects the real-time updates received from Lightstreamer Server into an Excel spreadsheet. The quotes for 30 stock items are managed.

Installation instructions:
Click the "run the demo" button. A zip file containing the Java application and the launch script will be downloaded. Extract the files and use the launch script start.bat.

The application connects to Lightstreamer Server on one side (by leveraging the Java SE Client API for Lightstreamer) and delivers the received data to any DDE-enabled application that is running on the PC on the other side (by leveraging a third-party DDE component for Java).

Launch the application, then click on "Start Lightstreamer" to connect to Lightstreamer Server ans subscribe to the quotes. You will see the update count spinning in the lower margin. Now click on "Copy Excel data to clipboard". The DDE subscription info will be copied into the clipboard. Open an Excel speadsheet and paste the data (CTRL-V). The real-time updates will show up on the spreadsheet.

To temporarily stop the DDE Server, without closing the Lightstreamer connection, click on "Toggle data feeding to Excel".

Adapters involved:

Client source code (for Lightstreamer Allegro+, Presto, Vivace):
     : Lightstreamer StockList Demo Client for Dynamic Data Exchange (DDE)
Real-Time Data (RTD) is a technology introduced in Microsoft Excel starting from 2002, aimed at replacing DDE for updating spreadsheets in real time.

This demo is made up of a DLL library that acts as an RTD Server, which receives updates from Lightstreamer Server on one side and injects them into Excel on the other side. The library has been developed with C#.NET (full source code is provided, see below). It leverages the .NET Client API for Lightstreamer to subscribe to 30 stock items and the Microsoft Office library to set up the RTD server.

Installation instructions:
  • You need Microsoft Excel 2002 or newer installed on your PC.
  • Click the "run the demo" button to download the application installer (a ".msi" file).
  • Execute the downloaded file to install the application.
  • From the Start menu, go to the "Lightstreamer RTD Demo" folder, click the "Start Lightstreamer Excel RTD Server Demo" link. This will open Excel and automatically load the "ExcelDemo.xls" spreadsheet (which, by the way, is contained in "C:\Program Files (x86)\Lightstreamer .NET RTD Server Demo library for Excel\static").
  • The spreadsheet will activate the Lightstreamer RTD library, which will open a control window, where you can see the data traffic.

The control windows shows a counter with the updates received from Lightstreamer Server and logs such updates in real time. Is also shows the notifications issued towards Excel. To pause the notification calls, uncheck "Data stream to Excel".

In the Excel spreadsheet, you will see several cells changing in real time. If the update rate looks slow (that is, you don't see several updates in a second), it means that the RTD ThrottleInterval of Excel is set to a high value. In order to activare real-time dispatching, please follow these instructions:
  • In Excel, go to the Visual Basic Editor (by pressing ALT+F11 or clicking Visual Basic Editor from the Macro menu (Tools menu).
  • Open the Immediate window (press CTRL+G or click Immediate Window on the View menu).
  • In the Immediate window type this code and press ENTER: Application.RTD.ThrottleInterval = 0

Adapters involved:

Client source code (for Lightstreamer Allegro+, Presto, Vivace):
     : Lightstreamer StockList Demo Client for Real-Time Data (RTD)