SPAWN is a service-oriented computing middleware for groups of mobile devices that are connected by a mobile ad hoc network. SPAWN builds on the principles of Sun's Jini middleware and offers basic service computing primitives as well as advanced features such as automated code management, run-time upgrade of services, logic ally mobile services, and services that exploit knowledge to produce better matches in a mobile environment.