Table of Contents
The Cascade DataHub has a built-in web server that lets you display live data in a web page in several different ways, depending on your needs. The data can come from any data source that is connected to the DataHub. A two-way data flow allows the user to view data and also write data back to the DataHub.
There are several different display technologies available:
ASP (Active Server Pages): DataHub scripts embedded in an HTML page are run by the DataHub each time the page is requested by the client. The DataHub scripts generate the page content dynamically before sending the page to the browser. This is also called "server-side scripting".
AJAX (Asynchronous Javascript and XML): Javascript code embedded in an HTML page is interpreted by the browser. The data updates automatically on the page, without the need for refresh. This is also called "client-side scripting".
Polling AJAX: The Javascript code periodically sends commands to the DataHub to update the data on the browser page.
Streaming AJAX: The Javascript code maintains an open connection to the DataHub, which transmits updates to each point individually whenever its value changes.
Java applets from the DataHub API for Java are embedded in the HTML code make a separate TCP connection from the browser to the DataHub. Once connected, the applets receive and display updated data values as soon as they change, without the need to refresh the page. The Java applets are executed by the browser, not by the DataHub.
Here is a comparison chart for these technologies:
ASP | Polling AJAX | Streaming AJAX | Java applets | |
---|---|---|---|---|
Web browser support | Desktop and mobile | Desktop and mobile | Desktop and mobile | Desktop only |
Plug-in/Active X required | No | No | No | Yes, Java plug-in |
Update speeds | No updates - Manual refresh required | Fast updates | Very fast updates | Very fast updates |
System requirements (CPU and memory) | Very low | High compared to Streaming AJAX and Java | Low compared to Polling AJAX, similar to Java. | Low compared to Polling AJAX, similar to Streaming AJAX. |
Bandwidth requirements (Will depend on point count and update rate) | Very low | Relatively high | Moderate to low | Moderate to low |
Security (Password / SSL protection) | Yes | Yes | Yes | Yes |
Firewall friendly | Yes | Yes | Yes | No, requires firewall configuration |
Licensing (Licenses required in addition to the standard DataHub Node license) | DataHub Web Server license | DataHub Web Server license | DataHub Web Server license, + TCP Link license for each connection | DataHub Web Server license, + TCP Link license for each connection |
Programming Requirements | Uses DataHub scripting language | Uses JavaScript | Uses JavaScript | Uses HTML. Requires knowledge of Java to build custom applets. |
Types of Application Common uses | Good for displaying static or slow moving data. Used for shift reports and statistics. | Good for displaying fast moving data and alarm conditions. Used in web monitoring and trouble shooting applications. | Excellent for displaying fast moving data. Used in remote monitoring and diagnostics systems. | Best choice for very high speed and large number of users. Used in stock trading and process control systems for monitoring and HMI displays. |
These different display technologies can be used together in the same page. For example, we often use ASP code to dynamically create AJAX tables that display live data in a web browser. The ASP code does the repetitive task of writing table entries for each point in a specific data domain and the web browser interprets the resulting JavaScript and builds the AJAX display accordingly. You can also use ASP to access data from an ODBC database and display it as part of the web page, along with the live data from the DataHub.
Most process data does not update very quickly, so ASP is suitable for a wide range of applications.
ASP will typically use very few system resources and bandwidth, so it is good for low speed connections.
ASP is the most efficient method for handling a large number of user connections.
ASP pages are generated by a script running in the DataHub. This means you can use the script to bring in data from other sources, such as from SQL databases. The web page can then display data from both live sources and database or text file archives.
Web pages that are generated by ASP scripts can usually be displayed on all desktop and mobile web browsers. This is because while the scripts themselves are written in Gamma (the DataHub script language), the web pages they generate are delivered as plain HTML.
In order to see new point values in an ASP page, you need to refresh the web page manually.
AJAX automatically updates the web page whenever the data changes in the DataHub, no page refresh is required.
AJAX can handle high speed updates to a large number of users. However, system resources on the server will increase as the number of points, the number of users and the speed of the updates increases.
AJAX displays are created using JavaScript programming, which means they are popular with web developers who wish to control all aspects of how the data is displayed in the web page.
AJAX can be displayed using most modern desktop and mobile web browsers, but some mobile web browsers may not support one of both types of AJAX display. We have found the Opera Mobile web browser to be one of the best for displaying AJAX on mobile devices.
Polling AJAX and Streaming AJAX differ as follows:
Polling AJAX web pages make requests for new data to the DataHub on a polling cycle. This means there is usually a higher load on the CPU compared with Streaming AJAX, but in many cases the update speeds are comparable.
Streaming AJAX web pages are highly efficient at moving data, which means they use very little system resources and much less network bandwidth compared to Polling AJAX applications.
Java applets are the best choice for displaying high speed data in complex web graphics like gauges, trends and progress bars.
Java displays can typically handle a large number data points, updating rapidly to a large number of users.
In most cases, Java web pages use far less system and network resources than AJAX pages.
Java pages are often used for displaying executive summary screens for management, or as an HMI to remote facilities.
We provide a wide range of Java applets that allow you to create sophisticated web pages with no programming required. Just use a simple HTML editor to configure the applet code and you can have a working web page up and running in a few minutes.
Java pages can be displayed using most modern desktop browsers, but they do require the free Java plug-in to be installed first. The plug-in will download and install automatically if it is not already installed on your system.
We have found that Java is generally not supported on mobile web browsers.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.