service-oriented computing semantics, processes, agents filefaxed to (+44) 1243 770571. this...

30
SERVICE-ORIENTED COMPUTING Semantics, Processes, Agents Munindar P. Singh North Carolina State University, USA Michael N. Huhns University of South Carolina, USA

Upload: others

Post on 29-Oct-2019

1 views

Category:

Documents


0 download

TRANSCRIPT

  • SERVICE-ORIENTED COMPUTINGSemantics, Processes, Agents

    Munindar P. SinghNorth Carolina State University, USA

    Michael N. HuhnsUniversity of South Carolina, USA

    Innodata0470091495.jpg

  • Service-Oriented Computing

  • SERVICE-ORIENTED COMPUTINGSemantics, Processes, Agents

    Munindar P. SinghNorth Carolina State University, USA

    Michael N. HuhnsUniversity of South Carolina, USA

  • Copyright c© 2005 John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester,West Sussex PO19 8SQ, England

    Telephone (+44) 1243 779777

    Email (for orders and customer service enquiries): [email protected] our Home Page on www.wileyeurope.com or www.wiley.com

    All Rights Reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted inany form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except underthe terms of the Copyright, Designs and Patents Act 1988 or under the terms of a licence issued by the CopyrightLicensing Agency Ltd, 90 Tottenham Court Road, London W1T 4LP, UK, without the permission in writing of thePublisher. Requests to the Publisher should be addressed to the Permissions Department, John Wiley & Sons Ltd,The Atrium, Southern Gate, Chichester, West Sussex PO19 8SQ, England, or emailed to [email protected], orfaxed to (+44) 1243 770571.

    This publication is designed to provide accurate and authoritative information in regard to the subject mattercovered. It is sold on the understanding that the Publisher is not engaged in rendering professional services. Ifprofessional advice or other expert assistance is required, the services of a competent professional should be sought.

    Other Wiley Editorial Offices

    John Wiley & Sons Inc., 111 River Street, Hoboken, NJ 07030, USA

    Jossey-Bass, 989 Market Street, San Francisco, CA 94103-1741, USA

    Wiley-VCH Verlag GmbH, Boschstr. 12, D-69469 Weinheim, Germany

    John Wiley & Sons Australia Ltd, 33 Park Road, Milton, Queensland 4064, Australia

    John Wiley & Sons (Asia) Pte Ltd, 2 Clementi Loop #02-01, Jin Xing Distripark, Singapore 129809

    John Wiley & Sons Canada Ltd, 22 Worcester Road, Etobicoke, Ontario, Canada M9W 1L1

    British Library Cataloguing in Publication Data

    A catalogue record for this book is available from the British Library

    ISBN 0-470-09148-7

    Printed and bound in Great Britain by Antony Rowe Ltd, Chippenham, WiltshireThis book is printed on acid-free paper responsibly manufactured from sustainable forestry in which at least twotrees are planted for each one used for paper production.

    http://www.wileyeurope.comhttp://www.wiley.com

  • To the Singh and Huhns families, especiallyTo Mona on our fifteenth anniversary – Munindar

    To Mary on our thirtieth anniversary – Mike

  • Contents

    About the Authors xix

    Preface xxi

    Note to the Reader xxvii

    Acknowledgments xxix

    Figures xxx

    Tables xxxv

    Listings xxxvi

    I Basics 1

    1 Computing with Services 31.1 Visions for the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    1.1.1 Semantic Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.1.2 Peer-to-Peer Computing . . . . . . . . . . . . . . . . . . . . . . . 41.1.3 Processes and Protocols . . . . . . . . . . . . . . . . . . . . . . . 51.1.4 Pragmatic Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    1.2 Precursors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.3 Open Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    1.3.1 Autonomy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.3.2 Heterogeneity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.3.3 Dynamism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.3.4 Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    1.4 Services Introduced . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111.5 Using Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121.6 The Evolving Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    vii

  • viii Contents

    1.7 Standards Bodies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141.8 Overview of this Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151.9 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    2 Basic Standards for Web Services 192.1 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.2 SOAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    2.2.1 Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.2.2 Body and Header . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.2.3 Faults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242.2.4 Message Exchange . . . . . . . . . . . . . . . . . . . . . . . . . . 252.2.5 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

    2.3 WSDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262.3.1 Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292.3.2 Operation Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 292.3.3 Creating WSDL Models . . . . . . . . . . . . . . . . . . . . . . . 30

    2.4 Directory Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302.5 UDDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    2.5.1 Conceptual Model . . . . . . . . . . . . . . . . . . . . . . . . . . 312.5.2 UDDI APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

    2.6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

    3 Programming Web Services 493.1 Representational State Transfer . . . . . . . . . . . . . . . . . . . . . . . . 493.2 A RESTful Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503.3 SOAP and REST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543.4 Developing and Using Web Services . . . . . . . . . . . . . . . . . . . . . 54

    3.4.1 Programming WSDL . . . . . . . . . . . . . . . . . . . . . . . . . 553.4.2 Java for Web Services . . . . . . . . . . . . . . . . . . . . . . . . 553.4.3 .NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

    3.5 Web Services Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . 573.6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

    4 Enterprise Architectures 614.1 Enterprise Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614.2 J2EE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624.3 .NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644.4 Model-Driven Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 664.5 Legacy Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674.6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

  • Contents ix

    4.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

    5 Principles of Service-Oriented Computing 715.1 Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

    5.1.1 Intraenterprise Interoperation . . . . . . . . . . . . . . . . . . . . 725.1.2 Interenterprise Interoperation . . . . . . . . . . . . . . . . . . . . 735.1.3 Application Configuration . . . . . . . . . . . . . . . . . . . . . . 745.1.4 Dynamic Selection . . . . . . . . . . . . . . . . . . . . . . . . . . 745.1.5 Software Fault Tolerance . . . . . . . . . . . . . . . . . . . . . . . 755.1.6 Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755.1.7 Utility Computing . . . . . . . . . . . . . . . . . . . . . . . . . . 755.1.8 Software Development . . . . . . . . . . . . . . . . . . . . . . . . 76

    5.2 Service-Oriented Architectures . . . . . . . . . . . . . . . . . . . . . . . . 765.2.1 Elements of Service-Oriented Architectures . . . . . . . . . . . . . 765.2.2 RPC versus Document Orientation . . . . . . . . . . . . . . . . . 77

    5.3 Major Benefits of Service-Oriented Computing . . . . . . . . . . . . . . . . 785.4 Composing Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

    5.4.1 Goals of Composition . . . . . . . . . . . . . . . . . . . . . . . . 805.4.2 Challenges for Composition . . . . . . . . . . . . . . . . . . . . . 80

    5.5 Spirit of the Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

    II Description 85

    6 Modeling and Representation 876.1 Modeling to Enable Interoperation . . . . . . . . . . . . . . . . . . . . . . 886.2 Integration versus Interoperation . . . . . . . . . . . . . . . . . . . . . . . 89

    6.2.1 Declarative versus Procedural Representations . . . . . . . . . . . 896.2.2 Interoperation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896.2.3 Layered View . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916.2.4 Interoperation Trends . . . . . . . . . . . . . . . . . . . . . . . . 92

    6.3 Common Ontologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 926.3.1 Ontologies: A Definition . . . . . . . . . . . . . . . . . . . . . . . 936.3.2 A Shared Virtual World . . . . . . . . . . . . . . . . . . . . . . . 946.3.3 Dimensions of Abstraction . . . . . . . . . . . . . . . . . . . . . . 966.3.4 Value Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

    6.4 Knowledge Representations . . . . . . . . . . . . . . . . . . . . . . . . . . 1016.4.1 Relationships Represented . . . . . . . . . . . . . . . . . . . . . . 1026.4.2 Frames versus Descriptions . . . . . . . . . . . . . . . . . . . . . 1036.4.3 Ontology Language Features . . . . . . . . . . . . . . . . . . . . 104

    6.5 Elementary Algebra: Relations . . . . . . . . . . . . . . . . . . . . . . . . 1066.6 Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

  • x Contents

    6.6.1 Taxonomy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1076.6.2 Meronomy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

    6.7 Modeling Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1086.7.1 Perspectives for Conceptualization . . . . . . . . . . . . . . . . . 1096.7.2 Guidelines for Conceptualization . . . . . . . . . . . . . . . . . . 1106.7.3 Modularity and Extensibility . . . . . . . . . . . . . . . . . . . . . 111

    6.8 UML as an Ontology Language . . . . . . . . . . . . . . . . . . . . . . . . 1126.9 Alternative Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1136.10 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1136.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

    7 Resource Description Framework 1197.1 Motivation for RDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1207.2 RDF Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

    7.2.1 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1217.2.2 Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1227.2.3 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1227.2.4 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

    7.3 Key Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1237.3.1 Containers and Collections . . . . . . . . . . . . . . . . . . . . . . 1237.3.2 Reification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1247.3.3 Information Model . . . . . . . . . . . . . . . . . . . . . . . . . . 125

    7.4 XML Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1257.5 The N-Triples Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1277.6 Storing RDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1287.7 RDF Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1287.8 Vocabularies in RDF Schema . . . . . . . . . . . . . . . . . . . . . . . . . 1307.9 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1317.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

    8 Web Ontology Language 1378.1 Getting Started with OWL . . . . . . . . . . . . . . . . . . . . . . . . . . . 1378.2 OWL Dialects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1408.3 OWL Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

    8.3.1 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1408.3.2 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1418.3.3 Class Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . 1438.3.4 Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

    8.4 OWL Axioms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1488.4.1 Individuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1488.4.2 Data Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1498.4.3 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1498.4.4 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

  • Contents xi

    8.4.5 Elementary Algebra: Functions . . . . . . . . . . . . . . . . . . . 1518.5 OWL Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1528.6 OWL Dialects Compared . . . . . . . . . . . . . . . . . . . . . . . . . . . 1548.7 An OWL Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1558.8 Expressiveness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

    8.8.1 Tree Model Definitions . . . . . . . . . . . . . . . . . . . . . . . 1588.8.2 Constraints among Individuals . . . . . . . . . . . . . . . . . . . . 1598.8.3 Specialized Properties . . . . . . . . . . . . . . . . . . . . . . . . 1598.8.4 Defeasible Concepts . . . . . . . . . . . . . . . . . . . . . . . . . 160

    8.9 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1608.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

    9 Ontology Management 1639.1 Language-Based Representations . . . . . . . . . . . . . . . . . . . . . . . 1649.2 Standard Ontologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

    9.2.1 Universal Business Language . . . . . . . . . . . . . . . . . . . . 1649.2.2 Cyc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1659.2.3 IEEE Standard Upper Ontology . . . . . . . . . . . . . . . . . . . 166

    9.3 Standardization versus Semantic Reconciliation . . . . . . . . . . . . . . . 1669.4 Consensus Ontologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

    9.4.1 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1689.4.2 Reconciling Ontologies . . . . . . . . . . . . . . . . . . . . . . . 1689.4.3 Correctness versus Relevance . . . . . . . . . . . . . . . . . . . . 172

    9.5 Ontology Imports and Versioning . . . . . . . . . . . . . . . . . . . . . . . 1729.6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1759.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

    III Engagement 177

    10 Execution Models 17910.1 Basic Interaction Models . . . . . . . . . . . . . . . . . . . . . . . . . . . 18010.2 Messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18110.3 CORBA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18210.4 Peer-to-Peer Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

    10.4.1 Going Beyond Client-Server . . . . . . . . . . . . . . . . . . . . . 18710.4.2 Models of P2P Computing . . . . . . . . . . . . . . . . . . . . . . 187

    10.5 Jini . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18810.6 Grid Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18910.7 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19110.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

  • xii Contents

    11 Transaction Concepts 19311.1 Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

    11.1.1 ACID Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 19511.1.2 Schedules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19611.1.3 Locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20011.1.4 Distributed Transactions . . . . . . . . . . . . . . . . . . . . . . . 202

    11.2 Transactions over Composed Services . . . . . . . . . . . . . . . . . . . . 20711.2.1 Architecture for Composed Services . . . . . . . . . . . . . . . . . 20711.2.2 Properties of Composed Transactions . . . . . . . . . . . . . . . . 20911.2.3 Difficulty with Compositional Serializability . . . . . . . . . . . . 21011.2.4 Achieving Compositional Serializability . . . . . . . . . . . . . . 211

    11.3 Limitations of Traditional Transactions . . . . . . . . . . . . . . . . . . . . 21411.4 Relaxing Serializability . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21511.5 Extended Transaction Models . . . . . . . . . . . . . . . . . . . . . . . . . 216

    11.5.1 Sagas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21811.5.2 Flex Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . 21811.5.3 DOM Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . 219

    11.6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21911.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

    12 Coordination Frameworks for Web Services 22512.1 WSCL: Web Services Conversation Language . . . . . . . . . . . . . . . . 22612.2 WSCI: Web Service Choreography Interface . . . . . . . . . . . . . . . . . 23112.3 WS-Coordination: Specifying Coordination . . . . . . . . . . . . . . . . . 234

    12.3.1 Coordination Service . . . . . . . . . . . . . . . . . . . . . . . . . 23412.3.2 Activation Service . . . . . . . . . . . . . . . . . . . . . . . . . . 23712.3.3 Registration Service . . . . . . . . . . . . . . . . . . . . . . . . . 238

    12.4 Web Service Transaction Types . . . . . . . . . . . . . . . . . . . . . . . . 24012.5 BTP: Business Transaction Protocol . . . . . . . . . . . . . . . . . . . . . 24212.6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24412.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244

    13 Process Specifications 24513.1 Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24513.2 Describing Dynamics with UML . . . . . . . . . . . . . . . . . . . . . . . 24713.3 Workflows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247

    13.3.1 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24913.3.2 Workflow Interoperability . . . . . . . . . . . . . . . . . . . . . . 25013.3.3 A Metamodel for Workflow . . . . . . . . . . . . . . . . . . . . . 25113.3.4 Interoperation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25213.3.5 State of the Art . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25513.3.6 Challenges Facing Workflow Technology . . . . . . . . . . . . . . 255

    13.4 Business Process Languages . . . . . . . . . . . . . . . . . . . . . . . . . . 256

  • Contents xiii

    13.4.1 BPEL4WS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25613.4.2 BPML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26113.4.3 ebXML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26213.4.4 RosettaNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272

    13.5 The Process Specification Language . . . . . . . . . . . . . . . . . . . . . 27413.6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27713.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

    14 Formal Specification and Enactment 28114.1 Scheduling with Dependencies . . . . . . . . . . . . . . . . . . . . . . . . 28214.2 Specifying Service Composition . . . . . . . . . . . . . . . . . . . . . . . 283

    14.2.1 Coordination Relationships . . . . . . . . . . . . . . . . . . . . . 28614.2.2 Example Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . 287

    14.3 Residuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28814.4 Symbolic Calculation of Residuals . . . . . . . . . . . . . . . . . . . . . . 28914.5 Distributed Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

    14.5.1 Temporal Logic for Internal Reasoning . . . . . . . . . . . . . . . 29114.5.2 Deriving Guards from Specifications . . . . . . . . . . . . . . . . 29314.5.3 Scheduling with Guards . . . . . . . . . . . . . . . . . . . . . . . 295

    14.6 Formalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29514.6.1 Evaluating Guards . . . . . . . . . . . . . . . . . . . . . . . . . . 29614.6.2 Simplification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29714.6.3 Formalizing Event Classes . . . . . . . . . . . . . . . . . . . . . . 298

    14.7 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30014.8 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30114.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301

    IV Collaboration 305

    15 Agents 30715.1 Agents Introduced . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30715.2 Agent Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30815.3 Agent Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310

    15.3.1 Reasoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31115.3.2 Internal Architectures . . . . . . . . . . . . . . . . . . . . . . . . 312

    15.4 Abstractions for Composition . . . . . . . . . . . . . . . . . . . . . . . . . 31615.5 Describing Compositions . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

    15.5.1 Representing and Reasoning about Action . . . . . . . . . . . . . 31815.5.2 OWL-S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318

    15.6 Composition as Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . 32615.7 Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327

    15.7.1 Applying Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328

  • xiv Contents

    15.7.2 Kinds of Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32815.7.3 Jess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33215.7.4 SWRL: Semantic Web Rule Language . . . . . . . . . . . . . . . 33315.7.5 Complexity and Expressiveness . . . . . . . . . . . . . . . . . . . 33415.7.6 Negation, Nonmonotonicity, Priorities . . . . . . . . . . . . . . . . 335

    15.8 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33615.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337

    16 Multiagent Systems 34116.1 Applicability in Service-Based Systems . . . . . . . . . . . . . . . . . . . . 34216.2 Multiagent Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34316.3 Agent Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34416.4 Life Cycle Management for Agents and Multiagent

    Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34716.5 Consistency Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . 349

    16.5.1 Truth Maintenance Concepts . . . . . . . . . . . . . . . . . . . . . 35016.5.2 Multiagent Truth Maintenance . . . . . . . . . . . . . . . . . . . . 35116.5.3 Consistency Maintenance for a Long-Lived Service . . . . . . . . 35216.5.4 Conflicts among Agents . . . . . . . . . . . . . . . . . . . . . . . 352

    16.6 Modeling Other Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35416.7 Cognitive Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35616.8 Applying the Cognitive Concepts . . . . . . . . . . . . . . . . . . . . . . . 35716.9 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35716.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

    17 Organizations 36117.1 Contracts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362

    17.1.1 Legal Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36217.1.2 Deontic Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36317.1.3 Commitments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364

    17.2 Spheres of Commitment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36717.2.1 Teams of Services . . . . . . . . . . . . . . . . . . . . . . . . . . 36817.2.2 Virtual Enterprises as Teams . . . . . . . . . . . . . . . . . . . . . 368

    17.3 Achieving Collaboration via Conventions . . . . . . . . . . . . . . . . . . . 37017.4 Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37117.5 Negotiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372

    17.5.1 Negotiation Protocols . . . . . . . . . . . . . . . . . . . . . . . . 37217.5.2 Negotiation Fundamentals . . . . . . . . . . . . . . . . . . . . . . 37417.5.3 Requirements for a Negotiation Language . . . . . . . . . . . . . . 377

    17.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379

  • Contents xv

    18 Communication 38118.1 Agent Communication Languages . . . . . . . . . . . . . . . . . . . . . . 381

    18.1.1 Speech Act Theory . . . . . . . . . . . . . . . . . . . . . . . . . . 38218.1.2 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38318.1.3 Interaction Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . 38418.1.4 Combining ACLs with Web Services . . . . . . . . . . . . . . . . 384

    18.2 Contract Net Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38518.3 Business Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388

    18.3.1 Compiling Business Protocols . . . . . . . . . . . . . . . . . . . . 39018.3.2 Compliance with Business Protocols . . . . . . . . . . . . . . . . 391

    18.4 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39418.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395

    V Selection 399

    19 Semantic Service Selection 40119.1 Semantic Matchmaking . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401

    19.1.1 Applying Ontologies . . . . . . . . . . . . . . . . . . . . . . . . . 40219.1.2 Requirements for an Advertising and Matchmaking Language . . . 40419.1.3 Selecting Services . . . . . . . . . . . . . . . . . . . . . . . . . . 404

    19.2 SoCom Matchmaking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40419.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406

    20 Social Service Selection 40920.1 Reputation Mechanisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41020.2 Recommender Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . 411

    20.2.1 Model-Based Approaches . . . . . . . . . . . . . . . . . . . . . . 41120.2.2 Memory-Based Approaches . . . . . . . . . . . . . . . . . . . . . 41120.2.3 Challenges for Recommender Approaches . . . . . . . . . . . . . 41220.2.4 Products versus Service Recommendations . . . . . . . . . . . . . 412

    20.3 Referrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41320.3.1 Adaptive Treatment of Referrals . . . . . . . . . . . . . . . . . . . 41320.3.2 Advantages of Referrals . . . . . . . . . . . . . . . . . . . . . . . 41420.3.3 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415

    20.4 Social Mechanism for Trust . . . . . . . . . . . . . . . . . . . . . . . . . . 41520.4.1 Empirical Basis . . . . . . . . . . . . . . . . . . . . . . . . . . . 41520.4.2 Local Belief Ratings . . . . . . . . . . . . . . . . . . . . . . . . . 41620.4.3 Combining Evidence . . . . . . . . . . . . . . . . . . . . . . . . . 41720.4.4 Gathering Opinions . . . . . . . . . . . . . . . . . . . . . . . . . 418

    20.5 Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41820.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418

  • xvi Contents

    21 Economic Service Selection 42121.1 Market Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42221.2 Auctions for Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424

    21.2.1 Auction Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42421.2.2 Online Auctions . . . . . . . . . . . . . . . . . . . . . . . . . . . 42421.2.3 Agent Economies . . . . . . . . . . . . . . . . . . . . . . . . . . 426

    21.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428

    VI Engineering 431

    22 Building SOC Applications 43322.1 Elements of SOC Design . . . . . . . . . . . . . . . . . . . . . . . . . . . 43322.2 Quality of Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43522.3 How to Create an Ontology . . . . . . . . . . . . . . . . . . . . . . . . . . 436

    22.3.1 Ontology Construction . . . . . . . . . . . . . . . . . . . . . . . . 43722.3.2 Ontology Guidelines and Conventions . . . . . . . . . . . . . . . . 439

    22.4 How to Create a Process Model . . . . . . . . . . . . . . . . . . . . . . . . 44122.5 How to Design Agent-Based Systems . . . . . . . . . . . . . . . . . . . . . 441

    22.5.1 Engineering Cooperation . . . . . . . . . . . . . . . . . . . . . . . 44222.5.2 Diversity versus Complexity . . . . . . . . . . . . . . . . . . . . . 443

    22.6 How to Construct Agent-Based Systems . . . . . . . . . . . . . . . . . . . 44522.7 How to Engineer Composed Services . . . . . . . . . . . . . . . . . . . . . 44522.8 Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44722.9 Knowledge Management Applications . . . . . . . . . . . . . . . . . . . . 450

    22.9.1 Agent-Based Knowledge Network . . . . . . . . . . . . . . . . . . 45122.9.2 Intranet Portals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45222.9.3 Communities of Practice . . . . . . . . . . . . . . . . . . . . . . . 452

    22.10 eBusiness Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45222.10.1 Business Models for eBusiness Applications . . . . . . . . . . . . 45422.10.2 eMarketplace Architectural Requirements . . . . . . . . . . . . . . 455

    22.11 Application to Supply-Chain Automation . . . . . . . . . . . . . . . . . . . 45722.12 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457

    23 Service Management 46323.1 Enterprise Resource Planning . . . . . . . . . . . . . . . . . . . . . . . . . 46323.2 WSMF: Web Services Management Framework . . . . . . . . . . . . . . . 46523.3 WSDM: Web Services Distributed Management . . . . . . . . . . . . . . . 465

    23.3.1 Contingency Plans for Service Failures . . . . . . . . . . . . . . . 46623.3.2 Security and Authentication . . . . . . . . . . . . . . . . . . . . . 46723.3.3 Features and Benefits of WSDM Centralization . . . . . . . . . . . 467

    23.4 Metadata Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46723.5 Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467

  • Contents xvii

    23.5.1 Scalability in Practice . . . . . . . . . . . . . . . . . . . . . . . . 46823.5.2 Scaling Infrastructure Services for Agents . . . . . . . . . . . . . . 46923.5.3 Scalability Experiments . . . . . . . . . . . . . . . . . . . . . . . 46923.5.4 Long-Lived Adaptable Agents . . . . . . . . . . . . . . . . . . . . 470

    23.6 Robust Services via Agent-Based Redundancy . . . . . . . . . . . . . . . . 47023.6.1 Architecture and Process . . . . . . . . . . . . . . . . . . . . . . . 47123.6.2 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . 472

    23.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473

    24 Security 47524.1 Securing Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475

    24.1.1 Nonrepudiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47624.1.2 Endorsement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47724.1.3 Certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477

    24.2 SAML and WS-Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47724.3 WS-Trust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47924.4 XACML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47924.5 Reasoning about Security Policies . . . . . . . . . . . . . . . . . . . . . . . 48124.6 Privacy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48124.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482

    VII Directions 485

    25 Challenges and Extensions 48725.1 Trust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48725.2 Ethics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488

    25.2.1 Machine Ethics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49025.2.2 Applying Ethics . . . . . . . . . . . . . . . . . . . . . . . . . . . 49125.2.3 Ethical Violations . . . . . . . . . . . . . . . . . . . . . . . . . . 491

    25.3 Coherence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49125.4 Benevolence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49225.5 Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49325.6 Managing Privacy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49425.7 Key Challenges and Recommendations . . . . . . . . . . . . . . . . . . . . 495

    VIII Appendices 497

    A XML and XML Schema 499A.1 Why XML? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499A.2 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501

    A.2.1 XML and Vocabularies . . . . . . . . . . . . . . . . . . . . . . . . 502

  • xviii Contents

    A.2.2 Transforming XML . . . . . . . . . . . . . . . . . . . . . . . . . 503A.2.3 Well-Formedness . . . . . . . . . . . . . . . . . . . . . . . . . . . 504A.2.4 Namespaces and Qualified Names . . . . . . . . . . . . . . . . . . 505A.2.5 Using Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506A.2.6 XML Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . 507

    A.3 XML Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507A.4 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510A.5 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510A.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511

    B URI, URN, URL, and UUID 515

    C XML Namespace Abbreviations 517

    Glossary 519

    Bibliography 523

    Index 533

  • About the Authors

    Munindar P. Singh is a Professor of Computer Science at North Carolina State University.From 1989 through 1995, he was with the Microelectronics and Computer Technology Cor-poration (better known as MCC). Munindar’s research interests include multiagent systemsand Web services. He focuses on applications in e-commerce and personal technologies.Munindar’s 1994 book Multiagent Systems, was published by Springer-Verlag. He coeditedReadings in Agents, which was published by Morgan Kaufmann in 1998. He has coeditedseveral other books and authored several technical articles. Munindar’s research has been rec-ognized with awards and sponsorship from the National Science Foundation, DARPA, IBM,Cisco Systems, and Ericsson.

    Munindar was the editor-in-chief of IEEE Internet Computing from 1999 to 2002 andcontinues to serve on its editorial board. He is a member of the editorial boards of the Journalof Autonomous Agents and Multiagent Systems and the Journal of Web Semantics. He serveson the steering committee for the IEEE Transactions on Mobile Computing.

    Munindar received a B.Tech. in computer science and engineering from the Indian Insti-tute of Technology, New Delhi, in 1986. He obtained a PhD in computer science from theUniversity of Texas at Austin in 1993.

    Michael N. Huhns is the NCR Professor of Computer Science and Engineering at the Uni-versity of South Carolina, where he also directs the Center for Information Technology. Pre-viously he was a Senior Member of the Research Division at the Microelectronics and Com-puter Technology Corporation. Prior to joining MCC in 1985, he was an Associate Professorof Electrical and Computer Engineering at the University of South Carolina, where he alsodirected the Center for Machine Intelligence.

    Mike is a member of Sigma Xi, Tau Beta Pi, Eta Kappa Nu, ACM, IEEE, and AAAI.He is the author of over 180 technical papers in machine intelligence and an editor of thebooks Distributed Artificial Intelligence, Volumes I and II, and, with Munindar, Readings inAgents. His research interests are in the areas of multiagent systems, enterprise modeling andintegration, and software engineering. From 1997 to 2003, he wrote a column Agents on theWeb for IEEE Internet Computing.

    Mike was an associate editor for IEEE Expert and the ACM Transactions on InformationSystems. He is an associate editor for the Journal of Autonomous Agents and Multiagent

    xix

  • xx About the Authors

    Systems. He is on the Editorial Boards of the International Journal on Intelligent and Coop-erative Information Systems, the Journal of Intelligent Manufacturing, and IEEE InternetComputing. He was an advisor for the First International Conference on Multiagent Systems,1995, and has been on the advisory boards for the International Workshops on DistributedArtificial Intelligence. He is a member of the board for the International Foundation forMultiagent Systems and the International Foundation on Cooperative Information Systems.

    Mike received the BSEE degree in 1969 from the University of Michigan, Ann Arbor,and the MS and PhD degrees in electrical engineering in 1971 and 1975, respectively, fromthe University of Southern California, Los Angeles.

    Contact information

    Munindar P. SinghDepartment of Computer ScienceNorth Carolina State UniversityRaleigh, NC 27695-7535, USA

    http://www.csc.ncsu.edu/faculty/mpsingh/[email protected]

    Michael N. HuhnsDepartment of Computer Science & EngineeringUniversity of South CarolinaColumbia, SC 29208, USA

    http://www.cse.sc.edu/˜huhns/[email protected]

  • Preface

    The current World-Wide Web was intended to be used by people, but most experts, includingthe founder of the WWW, Tim Berners-Lee, agree that the WWW will have to evolve toinclude usage by computer systems. Moreover, the impact of computer usage will exceed thatof human usage. The evolution is expected to occur through the design and deployment ofWeb services. The phrase Web services sometimes refers to services that employ a particularset of basic standards. Since these standards are all but incidental to the key concepts ofservices and services apply even in settings strictly different from the WWW, it is helpful tothink of service-oriented computing as a more general topic.

    The objective of this book is to explain the principles and practice of service-orientedcomputing, although most of its concepts are developed in the context of Web services. Thebook presents the concepts, architectures, theories, techniques, standards, and infrastructurenecessary for employing services. It includes a comprehensive overview of the state of theart in Web services and related disciplines.

    Services are a means for building distributed applications more effectively than with pre-vious software approaches. For this reason, it is not useful to talk about services withouttalking about service-based applications, how they are built from services, and how servicesshould be designed so they can feature as parts of serious applications. Indeed, the raisond’etre for services is that they be used for multiple purposes. And, services are used byputting them together or composing them—the rare case where a service is used withoutany contact with another service can be thought of as a trivial composition. For this reason,every aspect of services is designed to help them be composed: specifically, so they can bedescribed, selected, engaged, collaborated with, and evaluated.

    Many of the key techniques now being applied in building services and service-basedapplications were developed in the areas of databases, distributed computing, artificial intel-ligence, and multiagent systems. These are generally established bodies of work that can bereadily adapted for service composition. Some additional techniques, although inspired bythese areas, are being developed from scratch by practitioners and researchers in the con-text of service-oriented computing. These new techniques address the essential openness andscale of Web applications that previous work did not need to address. Both classes of keytechniques should be incorporated into our best practices. In most cases, they can be appliedon top of existing approaches.

    xxi

  • xxii Preface

    Philosophy and ApproachThe philosophical position taken by this book is that it is not possible for computer scientiststo develop an effective understanding of service-oriented computing by merely studying thebasic standards for Web services. Unless we take an impoverished view of the subject andare content merely to run some canned examples, we must perforce examine several areas ofcomputer science that come together in connection with services, and from which servicesderive their intellectual underpinnings.

    All science, as the Nobel Laureate Ernest Rutherford once famously asserted, is eitherphysics or stamp collecting. By physics Rutherford meant clean, succinct principles thatapply to diverse phenomena and by stamp collecting he meant the cataloging and organizationof large sets and varieties of observations.

    To develop complex services and service-based applications requires both physics andstamp collecting. Almost reluctantly, the professional community has adopted some softwareengineering approaches for services. Some of these are based on organizing knowledge as“ontologies” and then agreeing upon the ontologies. In the end, they will require a lot oforganizing, but the right abstractions will go a long way in streamlining this task.

    Most importantly, however, traditional software approaches are fundamentally not sen-sitized to the challenges of an open environment. The physics, as it were, is designed for aclosed environment. The effect is analogous to applying traditional mechanics to quantummechanical problems. So, while we obviously need engineering methodologies to take careof the stamp collecting, we also need elegant principles that would give us the new physics.

    AudienceWe have sought to make this book complete as a college textbook. However, because it alsoincludes many illustrations and examples, the book is eminently suitable for use by studentsand practitioners to learn about service-oriented computing on their own. This book servesthe following main kinds of readers in the following ways.

    Practitioners, who can supplement their knowledge of the details with an understanding ofthe concepts that underlie the standards and tools that they use, and the best practicesbased on those concepts. The book can help them leverage their practical experienceto build stronger service-oriented systems and applications.

    Technologists, including advanced developers and architects, who need to get their armsaround service-oriented computing. They can better understand the key technologiesand their key strengths and limitations, so they can conceive and execute their newmajor projects.

    IT Strategists, who are concerned by the notorious business versus IT divide of modernpractice. Service-oriented computing, as understood in this book, provides a concep-tual framework to bridge that divide.

  • Preface xxiii

    Researchers, who recognize the value of service-oriented computing as a source of majorresearch problems of practical import. They might be deeply knowledgeable in someaspect of the subject, but might nevertheless wish to get a crash course on the remainingaspects.

    Students, both graduate and senior undergraduate, who need to know about service-orientedcomputing simply to be adequately prepared for the expanding applications of services.And especially if their university curriculum is out of date and does not include service-oriented computing, they need to learn it on their own. The book can help them prepareto participate in the workforce in any of the above roles.

    We have given numerous tutorials at a number of leading conferences based on the materialspresented here. The attendees at those tutorials represented all of the above categories ofreader. Further, the manuscript has been used as a text for two graduate courses and anadvanced undergraduate course on Web services, and sections have been used within othergraduate courses in multiagent systems and cooperative information systems.

    Service-oriented computing is a new and dynamic area. It has captured the attention ofnumerous commercial interests, and many companies are introducing new techniques andsuggesting new standards on an almost daily basis. This book can only cover the state ofservice-oriented computing at a single point in time, but it emphasizes the essential conceptsthat will stand the test of time. It uses its associated website to cover changes and newerdevelopments.

    This book includes the essential background for anyone planning to learn and develop theprinciples and applications of service-oriented computing. It includes numerous theoreticaland programming exercises and some project ideas that all readers can use to solidify theirunderstanding. (Homework is not just for the students!) It has only a few prerequisites:some experience with Web programming or the willingness to learn it. Slides and homeworksolutions are available from http://www.csc.ncsu.edu/faculty/mpsingh/books/SOC/.

    The ContentsThis book is divided into the following major parts.

    Basics. Part I describes the key trends and architectures in modern computing that motivatewhy and how services are emerging. It also gives a crash course on current Web servicetechnologies so that readers can quickly begin to experiment with these technologies,possibly beginning on a small project.

    The key idea of an architecture based on Web services is that it identifies three maincomponents: a service provider, a service consumer, and a registry. Providers publishtheir services on registries, and consumers find the service providers from registriesand then invoke them. Current standards and techniques support these steps and enablemany important use cases. However, to our way of thinking, they are unnecessarily lim-ited in some respects. Yet the architecture of Web services provides a nice framework,

  • xxiv Preface

    which can be fleshed out with more powerful representations and techniques. Theseare established computer science approaches and serious practitioners are already usingthem, although they are omitted from most expositions of Web services. The rest ofthe book shows what these are and how they can be employed.

    Description. Part II addresses techniques and methodologies for describing services. Thesetechniques include ideas from conceptual modeling of database schemas and domainknowledge, and cover both representation and reasoning approaches. They lead natu-rally into some of the XML-based technologies gaining currency as the Semantic Web.The idea is that when services are described with sufficient richness, it is easier forproviders to state what they offer and for consumers to specify what they need, leadingto meaning-based interactions.

    Engagement. Part III deals with how services may be engaged or executed so as to facil-itate the simpler kinds of composition. Often, when services are described, there isan emphasis on invoking services as if they were no more than methods to be calledremotely. We prefer the term engagement, because it more accurately reflects the powerof the service metaphor for computing. Imagine going to a carpenter, a human serviceprovider, to have some bookshelves built in your home. You will typically not instructthe carpenter in how to build the shelves. Instead, you will carry out a dialog with thecarpenter in which you will explain your wishes and your expectations; the carpentermight take some measurements, check with some suppliers of hard-to-get materials(maybe some exotic woods), and suggest a few options; based on your preferences andyour budgetary constraints, you might choose an option or get a second estimate fromanother carpenter.

    Likewise, in computing, instead of merely invoking a particular method, you wouldengage a service. Here the relevant computational themes are peer-to-peer comput-ing, messaging, transactions (traditional, nested, and extended or relaxed), workflow,business processes, and exception handling. A number of standards for services areemerging in these areas.

    Collaboration. Part IV discusses advanced concepts that arise from a computational stand-point in composing services, where it is helpful to think of the services as collaboratingwith each other. Some of the key technologies that apply for collaboration include pro-tocols, agents, contracts, service agreements, and negotiation techniques. The engage-ment techniques in Part III give us the basis for engaging services while consideringvarious transactional properties. The techniques of collaboration in this part go severalsteps further in characterizing the interactions among the consumers and the providersof services, dealing with how they plan and enact service episodes, how they main-tain consistency, negotiate, enter into and execute contracts and agreements, and carryout specified protocols. This part includes a discussion of monitoring compliance withcontracts and service agreements.

    Selection. Part V introduces concepts of service discovery and selection, and distributed

  • Preface xxv

    trust. Service discovery in its simplest form involves registries where services canbe registered and looked up. However, selecting desirable services in practice alsoinvolves accommodating notions of trust, endorsement, and reputation.

    This part of the book also includes a discussion of how services can be evaluated by theparties using them. This is essential to complete the cycle of locating services, engag-ing the services, and then evaluating the services to determine if they were successful.Fair and accurate evaluation can enable the various parties to find, select, and engagethe services that are superior in some way.

    Engineering. Part VI focuses on the engineering of service-based applications. It discussesmethodologies and techniques for building services in the context of some importantclasses of applications, especially knowledge management and e-business. This partalso discusses the best practices for the main kinds of techniques described in the pre-vious parts.

    Directions. Part VII discusses some of the key trends in services and in architectures. Itconsiders architectural policies, privacy, and personalization from the perspective ofhow services fit into the larger world. It also discusses more advanced philosophicalnotions, such as ethics and social mores, with a view to inspiring services that functionin a manner that improves the network at large, not just optimizing the results forthemselves.

    Appendices. Part VIII has appendices on important background topics such as XML tech-nologies and Web standards and protocols. The appendix on XML, in particular, is asextensive as a chapter and includes description of all the key XML technologies thatyou need to know in order to read this book. It also includes exercises for readers whowish to test their knowledge.

    The organization of the book is designed to encourage the building of a series of projectsbeginning with the most basic applications of the most established standards, and endingwith areas where technologies are still gelling.

    Munindar P. Singh Michael N. HuhnsRaleigh, North Carolina Columbia, South Carolina

  • Note to the Reader

    This book brings together a lot of interesting concepts that apply in service-oriented comput-ing. Where possible, we have sought to describe the techniques that these concepts support—in other words, to make the concepts actionable. However, the concepts in many cases aresubtle; you must master the concepts before you can be effective with the techniques.

    We recommend that you read the text carefully and work through several of the theoreticalexercises. If this book is successful, it will have piqued your interest about several topics.If you have a theoretical bent, you will want to pursue deeper results. Virtually all topicsdiscussed here have a lot of depth, and a number of PhD problems lurk within. The bookcites the key work for each topic, which will give you excellent starting points.

    For those with an interest in practical implementations (and we recommend that eventheoreticians work on a few, just to keep grounded), the book provides a fair amount ofdetail about how various techniques can be realized. It discusses virtually all the key emerg-ing standards for service-oriented computing, and concludes with a discussion of engineer-ing challenges and the emerging methodologies and best practices to address them. In thissense, it is a lot more practical than the typical advanced textbook. If you are reason-ably experienced as a programmer, you can find the few necessary details to get started bydownloading the latest versions of the tools from the Internet. The book’s home page athttp://www.csc.ncsu.edu/faculty/mpsingh/books/SOC/ includes useful pointers.

    However, as you can well imagine, each standard and tool has a lot of nitty-gritty details.All too often these are not based on any theoretical concepts, but are accidents of history orpractical concerns of implementations. This book does not describe such idiosyncrasies. Inour own system development, we would learn such details by Internet searches or by trial anderror, and promptly forget them as soon as we could! For the bleeding edge standards andtools, there may be no other way; for the older ones you can perhaps find detailed books. Ineither case, this book will help you master the concepts that will last a long time, rather thandetails that might be lost in the next release.

    Lastly, please note that writing the first big book on a wide-ranging new topic is a dauntingtask. In our combined four decades of post doctorate experience, this is the largest intellectualventure that we have attempted. There will undoubtedly be lots of room for improvement.We welcome your suggestions!

    xxvii