Web services technology is a platform-independent, XML-based Web application on general computing systems. Two important components are needed to handle the XML (Extensible Markup Language) data. The first is the packaging mechanism to specify the XML data arrangement during information exchanges between machines. Contemporary Web services have adopted SOAP (Simple Object Access Protocol) for their purpose. The second is the XML parser to interpret the information from XML representation (for Web services) into raw data (for application or processor) and vice versa. SAX and DOM are the two most commonly used parsers. SAX (Simple API for XML) provides great resource saving but it only parses at forward direction; while DOM (Document Object Model) provides random accessibility and object-oriented characteristic but at high resource cost. Recently, ubiquitous Web services prompted the migration of the conventional Web services towards embedded system. For examples, several SOAP Web services were embedded on microprocessor-based board (Bucci et al., 2005; Machado et al., 2006; Almeida et al., 2007) and FPGA (Cuenca-Asensi et al., 2008). However, mapping of complex SOAP Web services onto low-resource embedded system triggered high processing and memory, thus increases the implementation cost. Also, there had been efforts to migrate the XML parsers towards embedded system using light-weight Java-based SAX and DOM parsers (Wilson, 2008; Scheemaecker, 2003; Collado et al., 2008). XimpleWare had introduced VTD-XML (Virtual Token Descriptor for XML) (Zhang, 2008) to achieve better resource-functionality tradeoff between SAX and DOM; but it still requires relatively high resources compared to SAX. A much lower resource-intensive XML parser is required to run embedded Web services. In addition, the overall high abstraction requirements of current embedded Web services had resulted in over-dependency on costly processor-based embedded system. Economical solution such as FGPA-based implementation is needed.
This dissertation proposes three strategies to achieve better optimization within resource-abstraction considerations of embedded Web applications: first, the implementation of efficient REST (Representational State Transfer) style Web services to replace SOAP; second, introduction of the novel RBStreX (Roll-Back Streaming XML) parser; and lastly, dedicated hardware implementation of Web applications' components. In the first strategy, a REST Web services server is proposed and implemented. The REST request services information resides within the HTTP header, instead of being HTTP payload data as SOAP does. When a REST request message is received from client, the server directly extracts the services information from the HTTP headers of the request message during HTTP processing stage. Then, the application program will execute the request based on the services information and generate corresponding response information. The response information will be wrapped in simple XML format, instead of lengthy SOAP format, and sent back to the client. In the second strategy, a RBSTreX is proposed as a new XML parsing method to serve embedded XML application. Direct Ancestor (DA) buffer and “roll-back” feature were introduced to provide backward referencing capability, which overcame the shortage of SAX's unidirectional parsing and offered more parsing flexibility. In order to avoid over-dependency on software platform, both REST Web services and RBStreX had been implemented in dedicated hardware design to achieve high performance and low resource utilization.
Hardware prototypes of both REST and SOAP Web services implementations had been first simulated on Altera Quartus II software; and then carried out and compared on a Spartan 3-E Starter Kit FPGA platform. Comparisons were focused on the effects of REST and SOAP packaging mechanism by ignoring application program complexity, as well as discovery and description mechanisms of Web services. The REST implementation had utilized less FPGA logic resource (about 15% reduction on slices utilization), less processing stages (no XML message extraction for service request) and performed faster (12∼13% reduction on processing time) than SOAP. It also utilized shorter services messages (60∼75% reduction on request message; 30∼50% reduction on response message) than that of SOAP, proving lower memory requirement. Meanwhile, the RBStreX parser with backward reference parsing capability was simulated on Altera Quartus II software. It utilizes resource (10B for 1kB XML document) slightly higher than SAX (almost no memory usage) but significantly smaller than VTD-XML (1.3~1.5kB for 1kB XML document). The drawback of RBStreX is its variable total parsing time that depends on the pattern of parsing operations. In conclusion, both REST Web services and RBStreX parser were successfully demonstrated on embedded Web services applications at low resource usages, which will be useful for low cost applications.