A Service-oriented Model for Embedded Peer-to-Peer Systems