The stream-based service-centred calculus: a foundation for service-oriented programming