9.2.1 Implementation Complexity
For smart objects, their limited resources require a low software complexity. Smart objects are resource limited not only in energy and bandwidth, but also in memory. For web services to be a viable communication mechanism for smart objects, implementations of web services mechanisms must have a small footprint.
Web services for large-scale server systems have been criticized for being too complex even for large-scale systems, so it was not always clear that web services would be a viable alternative for smart objects. Recent implementations, such as those by Priyantha et al. and Yazar and Dunkels, have shown that web services are indeed a viable mechanism for resource-constrained smart object systems.
The web services implementation by Priyantha et al.  is a simplified variant of the SOAP-based web services that provide interoperable functionality with existing systems, but does not implement the full specification. Their system is implemented on top of the uIP TCP/IP stack , which is known for its small implementation complexity.
The code size and memory footprint for the web services implementation by Priyantha et al. is shown in Table 9.1. These data include both the size of the uIP TCP/IP stack and the simplified HTTP server and XML parser. The uIP code size includes the IP protocol (the part of the TCP protocol required for acting as a TCP server), but does not include the UDP protocol. The code size is measured for the MSP430 microprocessor and the code is compiled with the gcc C compiler.
Table 9.1 Memory Footprint for the Simplified SOAP Web Services Implementationa
The resulting code size is a few kilobytes, which is well suited for typical smart object systems. The system for which Priyantha et al. developed their web service implementation has 48 kB of code space available.
Similarly, the code size and data footprint of the implementation by Yazar and Dunkels  is presented in Tables 9.2 and 9.3. The two tables show the size of two different implementations of web services for smart objects: Table 9.2 illustrates the size of the implementation of REST-based web services for smart objects, and Table 9.3 illustrates the size of the implementation of SOAP-based web services for smart objects. The code size is for the MSP430 microprocessor and the code was compiled with the gcc C compiler.
Table 9.2 Memory Footprint for the REST Web Services Implementationa
Table 9.3 Memory Footprint for the SOAP Web Services Implementationa
Like the system by Priyantha et al., the system by Yazar and Dunkels uses the uIP TCP/IP stack as the underlying IP communication layer. Unlike the system by Priyantha et al., the system by Yazar and Dunkels includes the full uIP stack, including the full TCP and IP implementations as well as the UDP implementation. Thus the code size is larger. Furthermore, the Yazar and Dunkels implementation contains additional functionality over the implementation by Priyantha et al., making the code size for the HTTP server, the XML parser, and the SOAP engine larger.
Taken together, the two independent implementations by Priyantha et al. and Yazar and Dunkels show that the implementation complexity of web services is low. The results show that web services fit the memory constraints of smart object systems. Thus far, however, these data do not tell us whether the performance of web services is suitable for the bandwidth and power constraints of smart objects. We turn to this subject next.