Thank you for recommending "".
Your recommendation has been successfully processed.
Boost Internet-Based Applications With Embedded Device Gateways
The chaos of diverse physical systems can be transformed into an orderly and uniform set of software interfaces that bridge to high-speed networks.
Date Posted: February 17, 2003 12:00 AM
SOLVING THE PROBLEMS
At this point, it's beneficial to take a closer look at the challenges associated with delivering the device state to clients with an embedded device gateway. The requirements for this aspect of the design are:
- Make device variables available to multiple clients.
- Create a system to allow controlled access to the device subnet bandwidth.
- Eliminate the need for network clients to poll, even if the device is on a polled subnetwork.
- Make the above possible without unbounded system resource demands at the device gateway.
Three main components are used to create the underlying device access handler:
- Timed-event list: This module manages a list of events that may be one-shot or periodic. The nodes on the list are ordered in time so each node has a field representing the amount of time to wait after the previous node is activated. A thread takes a node off the list, sleeps for the period of time specified by the node's delay field, then places the work description onto the Ready Queue. The periodic timed-event nodes get immediately placed back into the timed-event list when the work description is queued up.
- Ready queue. This is a queue of events currently ready to be processed.
- A thread pool. This group of threads block waiting for something to be placed into the ready queue. Each thread will take a node off, process it, then either destroy it, if it was one-shot, or leave it alone if it is on the timed-event list as periodic.
When several clients are interested in the state changes of a given variable, the rate of each client subscription is logged in the subscription list. If the variable is on a device, which must be polled, a node is created in the poll list. This node is part of a timed-event list and is set to run at the minimum rate that satisfies all subscribed clients. If a client drops a subscription request, the poll rate is recalculated. This system is much more efficient in its use of subnetwork bandwidth than honoring requests for each individual client. On the LAN or WAN connection between the client and the gateway, this system reduces traffic because the variable updates are supplied only when a state change occurs.
To provide higher throughput when the device subnet is relatively fast, the thread pool may be made larger or smaller during run time, as needed. This structure is set up so the gateway services that interact with resources enforcing serialization are serialized by data structures rather than rely on operating-system resources. An alternative approach that spawns many threads to act as handlers for each transaction wastes resources handling the contention created when the threads try to access the subnet. This system also uses very little memory to hold Device State because only direct requests for a particular variable and subscriptions result in storage demands.
SERVICE INDIRECTION ISSUES
In future applications, the networking infrastructure will increasingly play the role of service provider. Designers could augment sprinkler controllers with weather forecast information to conserve water. If rain is only a day away, the lawn can hold out. The data format and means of access the embedded controller uses must remain static for the life of the product to guarantee continued operation. If a server goes down, the product feature also goes down. This is particularly important with respect to a denial of service attack on the source of the weather information. A device gateway is an indirection point that can maintain consistent format and access to devices in need of consistency.
GLOSSARY
Device Object: A logically related set of functions, variables, and attributes implemented by embedded firmware on a product and made available for remote access through a network.
HTTP or HyperText Transfer Protocol: Used by the Web, this protocol defines how messages are formatted and transmitted and what actions Web servers and browsers should take in response to various commands.
Jini: Sun Microsystems' software for simplifying the connection and sharing of network devices like disk drives and printers.
Schema: The type of a device object. The definition includes both the names and types of individual functions, variables, and events, plus the behavior of the device.
SGML or Standard Generalized Markup Language: System for organizing and tagging the elements of a document that was developed and standardized by the ISO (International Organization for Standards).
SNMP or Simple Network Management Protocol: A set of protocols aimed at managing complex networks.
SOAP or Simple Object Access Protocol: Provides a platform-independent means for applications to communicate with each other over the Internet.
UPnP or Universal Plug and Play: An architecture for achieving compatibility among the products (software, peripherals, and networking equipment) of the more than 400 vendors that belong to the Universal Plug and Play Forum.
Variable Subscription: When an application needs to be notified about device condition changes or when periodic status is required, the application makes a subscription to one or more variables on the device. The device gateway is responsible for providing these updates even if the device must be polled in order to detect condition changes.
XML or Extensible Markup Language: A pared-down version of SGML designed particularly for Web documents.
microcontrollers