This project includes a simple web client front-end example for the Lightstreamer RoundTrip Demo Adapter
HTML CSS JavaScript
Permalink
Failed to load latest commit information.
src
.gitattributes
.gitignore
LICENSE
README.md
screen_roundtrip.png
screen_roundtrip_large.png

README.md

Lightstreamer - Round-Trip Demo - HTML Client

This project includes a simple web client front-end example for the Lightstreamer - Round-Trip Demo - Java Adapter.

Live Demo

screenshot

View live demo

Details

The Round-Trip Demo uses the JavaScript Client API for Lightstreamer to let 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.

The demo includes the following client-side functionalities:

Install

If you want to install a version of this demo pointing to your local Lightstreamer Server, follow these steps:

  • Note that, as prerequisite, the Lightstreamer - Round-Trip Demo - Java Adapter has to be deployed on your local Lightstreamer Server instance. Please check out that project and follow the installation instructions provided with it.
  • Launch Lightstreamer Server.
  • Get the lightstreamer.js file from the Lightstreamer 5 Colosseo distribution and put it in the src/js folder of the demo (if that is the case, please create it). Alternatively, you can build a lightstreamer.js file from the online generator. In that case, be sure to include the LightstreamerClient, Subscription, StaticGrid, ConnectionSharing, and StatusWidget modules and to use the "Use AMD" version.
  • Get the require.js file form requirejs.org and put it in the src/js folder of the demo.

You can deploy this demo to use the Lightstreamer server as Web server or in any external Web Server you are running. If you choose the former case, please create the folders <LS_HOME>/pages/demos/RoundTripDemo then copy here the contents of the src folder of this project.
The client demo configuration assumes that Lightstreamer Server, Lightstreamer Adapters, and this client are launched on the same machine. If you need to target a different Lightstreamer server, please search this line:

var lsClient = new LightstreamerClient(protocolToUse+"//localhost:"+portToUse,"ROUNDTRIPDEMO");

in js/lsClient.js file and change it accordingly.

The demo is now ready to be launched.

See Also

Lightstreamer Adapters Needed by This Demo Client

Related Projects

Lightstreamer Compatibility Notes

  • Compatible with Lightstreamer JavaScript Client library version 6.0 or newer.