eXtremeWS is McObject's embedded Web server designed specifically for the needs of embedded devices. It implements a rich set of capabilities that are essential for embedded development, and can be tightly integrated with the eXtremeDB embedded database..
Embedded Web servers allow monitoring and control over embedded applications using any standard browser. Before HTTP, such devices were typically controlled via a front panel, dumb terminal, or custom client connected to the device using a proprietary protocol. That increased the target code size and required the programmer to implement added functionality on the device – and quite frequently to implement the client side GUI, as well.
Integrating a HTTP server on the device largely eliminates target programming and provides an excellent implementation option for embedded Internet user interfaces. Web-based device management offers other advantages, including:
No client software to distribute, and no porting of device management software from one desktop platform to another
A device with an embedded Web interface is accessible almost anywhere
A Web interface can link to internal systems such as help systems, problem report systems, etc., reducing device maintenance cost
Web interfaces are relatively easy to develop and maintain
The browser-server connection can be made secure
In most cases it is possible to simulate device functions on the host machine and develop the user interface in parallel with the embedded application.
Compared to Web servers designed for enterprise use, McObject’s eXtremeWS provides:
A small CPU and memory footprint. Internet appliances and other connected devices are typically cost- and resource-constrained
Support for devices without permanent storage. An embedded Web server must support devices without file systems, hard disks or other storage, yet be accessible and subject to control via the Web. In the absence of storage, static Web pages can be encoded and linked directly into the embedded Web server
Easy integration with embedded applications. Easy integration with device functions and operating system is essential, to reduce time-to-market. Available Web server source code eases this task
Configurability. Developers must be able to configure the Web server to fit both embedded application and device operating environment requirements, with features that can be included or excluded as needed, and adjustable runtime services
Portability. The life span of a software application today often exceeds that of hardware, so portable software, including the HTTP server, is critical
eXtremeWS is a library archive and is distributed with complete source code. The library defines the embedded HTTP server programming interface. Source code enables Web server integration with application code, or access to the Web server’s event loop.
eXtremeWS currently supports the following features:
HTTP 1.1 (RFC2616) compliant
HTTP 1.0
Small footprint of 15K to 35K depending on the operating system and configuration
Configurable thread pool. The server can run as single-threaded or multi-threaded, and the number of threads serving incoming HTTP requests is configurable via a simple #define statement
Multiple network interfaces
Configurable heap manager. Some embedded OSes lack effective heap managers, therefore eXtremeWS can be configured to use the efficient eXtremeDB embedded database heap manager
Configurable transport layer. TCP/IP can be replaced with other transports
Multiple and configurable reporting capabilities
Support for sessions, including a configurable maximum number of sessions and session timeouts. Sessions enable establishment of state information to provide context for a series of operations .Support for HTTP basic authorization. Dynamic content generation methods:
Template-based
In-process CGI as well as traditional CGI. Traditional CGI processing results in the creation of a new process for each request to a CGI URL, which can be slow and resource-intensive. In-process CGI supports dynamic content more suitably for high performance and resource-constrained embedded systems: CGI procedures run in-process without creating a new execution path for each browser connection, and can access the full request context directly.
With in-process CGI, eXtremeWS can use one of three content buffering schemes:
no buffering (not HTTP 1.1 compliant)
full buffering
chunked content
Application-defined HTTP header fields
Content Compiler. This utility reads and encodes a directory with HTML files into a C source code file. This file is compiled and linked with other eXtremeWS object code to produce a web server with built-in static HTML content, thus eliminating dependence on a file system for serving static HTML
Optional static content compression
Optional built-in in-memory database to store and manipulate dynamic content and other data
eXtremeWS is extremely portable. Supported platforms include:
Windows
Embedded Linux and Linux
Lynx OS
QNX
Web-based device management is quickly becoming an industry standard. It allows separation of the embedded software and the user interface code, use of markups to access and control device internal parameters and on-device embedded data management. The eXtremeWS embedded HTTP server package includes reference designs that demonstrate how the Web server can be used to communicate with remote devices running applications incorporating the eXtremeDB embedded database. Complete source code for the reference applications is available.
Digital television technologies, such as set-top boxes and home gateways have sophisticated data management requirements. The Electronic Programming Guide (EPG) manages TV listings, program and channel descriptions, IRD tuning parameters and other related information. The EPG application demonstrates how eXtremeWS can be used to query and control EPG databases. The embedded application communicates with the eXtremeDB in-memory database runtime via in-process CGI, and provides for the initial loading and querying guide data and displaying the guide on the screen.
The Web interface for the EPG application contains static and dynamic content. The dynamic content is generated from the eXtremeDB-based EPG database via the in-process CGI functionality provided by eXtremeWS. Static content is processed (compiled) by the eXtremeWS Content Compiler (mk content) and linked into the EPG application executable. The EPG application uses a statistically accurate snapshot of programming guide for 14 days of programming on 400 channels. Depending on the platform, the snapshot resides in plain text or compressed files from which the EPG is loaded. In a real-life EPG, the content is received from satellite, cable or terrestrial sources, eliminating the need for a file system
This application demonstrates a communication session between the browser and the eXtremeDB database running in the context of eXtremeWS. The automatic weather station (AWS) collects metrological and diagnostic data and communicates this data to the internet browser in form of HTML documents.
The application simulates the process of collecting temperature, pressure and humidity measurements from sensors, which are then stored in the eXtremeDB database. The METEO database is accessed remotely via an HTML interface that is a mix of static content (such as images) and dynamic content implemented via templates.
This application demonstrates use of the eXtremeDB embedded database and eXtremeWS embedded HTTP server as the basis for health advisory systems for Pulp and Paper mills. An automatic monitoring and management system for industrial paper machines diagnoses various process and paper machine component conditions and communicates the data to the client, which presents the data analysis in an easy-to-use display. That allows production and maintenance personnel to quickly isolate problems and make immediate adjustments to the process.
The application simulates the process of monitoring with sensors attached to various parts of the paper machine. Accelerometers and thermometers attached to the machine's felt, rollers and bearings collect real-time vibration and temperature data in the database. This data is analysed in real-time and communicated to the client computer over HTTP. A “Status” page contains the last registered “events” measurements that indicate an alarm, danger or warning state for the controlled equipment. A “Reports” page displays the history for each sensor. Finally, a “Configuration” page allows changes to sensors’ threshold values.
The Web interface consists of dynamic content generated at runtime via templates, and static content compiled into the application. The application is very configurable. The amount of RAM and the number of threads used can be established based on available resources.
Process control, telecom and network gear, and other systems with demanding “five-nines” reliability (99.999% up-time) requirements comprise a fast-growing segment of embedded software. Like embedded systems overall, these applications are managing greater volumes of more complex data — creating a need for fast, lightweight databases that can meet their reliability imperative
The HA Device Management Console application presents a control panel that allows management, control and display of the state of multiple connected devices running eXtremeDB-HA - based applications. Each application reports its current state to the Management Console via a HTTP connection to the eXtremeWS embedded Web server.
The Web interface for the high availability reference application is divided into two parts. The first part of the Web interface catches the output of the eXtremeDB-HA-enabled application running on the controller, and transmits it to the second part of the Web interface. The second part is a HTTP application that aggregates the state data received from the controller’s application and displays this information in the browser. It also includes the HA cluster "control panel" from which the high availability processes can be initiated and terminated.
This application uses in-process CGI and the "template" technology provided by eXtremeWS.