Developing pervasive systems as service-oriented multi-agent systems