Principles, Patterns & Constraints for Building Enterprise Solutions with REST
Pearson (Verlag)
  • 1. Auflage
  • |
  • erschienen am 16. August 2012
  • |
  • 624 Seiten
E-Book | ePUB mit Adobe-DRM | Systemvoraussetzungen
978-0-13-286991-1 (ISBN)

The Definitive Guide to Building Web-Centric SOA with REST

The World Wide Web is based on the most successful technology architecture in history. It has changed how we view, access, and exchange information and, with the advent of REST, it has also provided us with compelling ways to build and improve automation solutions. REST provides a great deal of guidance to ensure that an architecture and its automation logic are technically sound, though it is still your responsibility to build services that actually add value to your business.

SOA with REST is the first comprehensive tutorial and reference for designing and building RESTful services as part of service-oriented solutions and in conjunction with service-oriented architecture (SOA). This book demonstrates that REST is not only a suitable medium for building truly service-oriented solutions, but also that the service-oriented architectural model is a necessary foundation for REST technology architectures to realize their full business potential.

The authors provide thorough mapping of REST constraints and architectural goals with service-orientation principles and SOA characteristics. Using real-world examples, they show how to leverage REST's simplicity, flexibility, and low overhead without compromising the power or manageability of service-oriented solutions and architectures.

This ebook will be valuable to IT architects, developers, and any practitioner seeking to use SOA and REST together.

1. Auflage
  • Englisch
  • USA
Pearson Education (US)
  • Für höhere Schule und Studium
  • 35,41 MB
978-0-13-286991-1 (9780132869911)

Thomas Erl is a best-selling IT author and the world's top-selling SOA author. His books encompass topics ranging from cloud computing, semantic Web technology, and SOA. He is the series editor of the Prentice Hall Service Technology Series from Thomas Erl, as well as the editor of the Service Technology Magazine. With more than 160,000 copies in print world-wide, his published books have become international bestsellers and have been formally endorsed by senior members of major IT organizations, such as IBM, Microsoft, Oracle, Intel, Accenture, IEEE, MITRE, SAP, CISCO, and HP. As the founder of Arcitura Education Inc., Thomas has overseen the development of curricula for the internationally recognized SOA Certified Professional (SOACP) and Cloud Certified Professional (CCP) accreditation programs, which have established a series of formal, vendor-neutral industry certifications. Thomas has toured over 20 countries as a speaker and instructor for public and private events and regularly participates in SOA, Cloud + Service Technology Symposium, and Gartner conferences. More than 100 articles and interviews by Thomas have been published in numerous publications, including The Wall Street Journal and CIO Magazine.

Benjamin Carlyle is a founding developer of the Invensys Rail "SystematICS" services framework, and has worked for many years as a software developer, software architect, and systems engineer on railway projects worldwide. He has focused on integrating REST and services technologies since around 2004. His work is referenced in several books on Restful Web services and on microformats, he has presented at the International SOA Symposium, and has served on the technical committee for international workshops on RESTful Design. He is credited with helping inspire the RESTlet framework for Java, and coined the term "REST Triangle" to describe the structure of a REST uniform contract. He has a deep understanding of both the theory and practice of REST and related styles as well as broader software and systems architecture topics.

Cesare Pautasso is an assistant professor at the Faculty of Informatics at the University of Lugano, Switzerland. Previously he was a researcher at the IBM Zurich Research Lab and a senior researcher at ETH Zurich, where he also completed his graduate studies with a Ph.D. in 2004. His teaching, research, and consulting activities both in academia and in industry cover advanced topics related to Software Architecture, Service Oriented Computing, and emerging RESTful Web services technologies. His research group focuses on building experimental systems to explore the intersection between the REST architectural style and model-driven software composition techniques, business process management, and liquid, self-organizing service-oriented architectures. He is an active member of IEEE and ACM, where he has participated in more than 100 international conference/workshop program committees. He has started the series of International Workshops on RESTful Design (WS-REST) at the WWW conference and was the general chair of the 9th IEEE European Conference on Web Services (ECOWS 2011). He regularly referees for Swiss, EU, and international funding agencies.

Raj Balasubramanian is a senior technologist from the Business Process Optimization (BPO) team within IBM Software Group focused on delivering SOA/BPM/Cloud solution across industries. Depending on the needs of the customer he has played the role of an enterprise architect, system architect, or solution architect to deliver on the engagement at hand. Prior to the focus on BPO, he was a lead portal architect delivering portal solutions to medium and large enterprise as part of the Lotus brand. He has published numerous articles on IBM DeveloperWorks and speaks at industry conferences on a variety of topics. His interests are in distributed systems, applying Web constructs to solution design, and using formal models and analytics to reason about large systems. Raj is also pursuing a Ph.D. in ECE at University of Texas at Austin where he is applying machine learning and data mining techniques to networked data from social Web to human travel. His official profile is on, which links to his various personas.

Foreword by Stefan Tilkov xxix

Acknowledgments xxxiii

Chapter 1: Introduction 1

1.1 About this Book 2

Who this Book is For 2

What this Book Does Not Cover 3

1.2 Recommended Reading 3

1.3 How this Book is Organized 4

1.4 Conventions 8

Use of the Color Red 8

Design Constraints, Principles, and Patterns: Page References and Capitalization 8

Design Goals: Capitalization 9

Symbol Legend 9

1.5 Additional Information 10

Updates, Errata, and Resources ( 10

Master Glossary ( 10

Service-Orientation ( 10

What Is REST? ( 10

Referenced Specifications ( 10

The Service Technology Magazine ( 10 SOA Certified Professional (SOACP) 11 Cloud Certified (CCP) Professional 11

Notification Service 11

Chapter 2: Case Study Background 13

2.1 How Case Studies Are Used 14

2.2 Case Study Background #1: Midwest University Association (MUA) 14

History 14

IT Environment 14

Business Goals and Obstacles 16

1. Build Reusable Business Services 18

2. Consolidate Systems and Information 18

3. Improve Channel Experience 18

4. Build Services Infrastructure 18

2.3 Case Study Background #2: KioskEtc Co. 18

History 19

IT Environment 19

Business Goals and Obstacles 19

Part I: Fundamentals

Chapter 3: Introduction to Services 23

3.1 Service Terminology 24

Service 24

Service Contract 24

Service Capability 26

Service Consumer 26

Service Agent 27

Service Composition 27

3.2 Service Terminology Context 29

Services and REST 29

Services and SOA 29

REST Services and SOA 29

Chapter 4: SOA Terminology and Concepts 31

4.1 Basic Terminology and Concepts 32

Service-Oriented Computing 33

Service-Orientation 34

Service-Oriented Architecture (SOA) 37

SOA Manifesto 38

Services 39

Cloud Computing 40

IT Resources 41

Service Models 41

Agnostic Logic and Non-Agnostic Logic 42

Service Inventory 42

Service Portfolio 43

Service Candidate 44

Service Contract 44

Service-Related Granularity 45

Service Profiles 46

SOA Design Patterns 46

4.2 Further Reading 49

4.3 Case Study Example 50

Chapter 5: REST Constraints and Goals 51

5.1 REST Constraints 52

Client-Server 53

Stateless 54

Cache 55

Interface/Uniform Contract 55

Layered System 56

Code-On-Demand 57

5.2 Goals of the REST Architectural Style 58

Performance 58

Scalability 59

Simplicity 60

Modifiability 61

Visibility 61

Portability 62

Reliability 62

Case Study Example 63

Part II: RESTful Service-Orientation

Chapter 6: Service Contracts with REST 67

6.1 Uniform Contract Elements 68

Resource Identifier Syntax (and Resources) 69

URIs (and URLs and URNs) 69

Resource Identifiers and REST Services 71

Methods 71

Media Types 73

6.2 REST Service Capabilities and REST Service Contracts 75

6.3 REST Service Contracts vs. Non-REST Service Contracts 77

Non-REST Service with Custom Service Contract 77

REST Service with Uniform Contract 79

HTTP Messaging vs. SOAP Messaging 81

REST Service Contracts with WSDL? 82

6.4 The Role of Hypermedia 83

URI Templates and Resource Queries 86

6.5 REST Service Contracts and Late Binding 87

Case Study Example 90

Chapter 7: Service-Orientation with REST 93

7.1 "SOA vs. REST" or "SOA + REST"? 95

7.2 Design Goals 97

Increased Intrinsic Interoperability 97

Increased Federation 98

Increased Vendor Diversity Options 99

Increased Business and Technology Alignment 100

Increased ROI 100

Increased Organizational Agility 102

Reduced IT Burden 102

Common Goals 103

7.3 Design Principles and Constraints 104

Standardized Service Contract 104

Service Loose Coupling 105

Service Abstraction 107

Service Reusability 109

Service Autonomy 110

Service Statelessness 111

Service Discoverability 113

Service Composability 114

Common Conflicts 114

Stateful Interactions 115

Service-Specific Contract Details 115

Case Study Example 116

Part III: Service-Oriented Analysis and Design with REST

Chapter 8: Mainstream SOA Methodology and REST 127

8.1 Service Inventory Analysis 131

8.2 Service-Oriented Analysis (Service Modeling) 133

8.3 Service-Oriented Design (Service Contract) 135

8.4 Service Logic Design 137

8.5 Service Discovery 137

8.6 Service Versioning and Retirement 138

Chapter 9: Analysis and Service Modeling with REST 139

9.1 Uniform Contract Modeling and REST Service Inventory Modeling 141

REST Constraints and Uniform Contract Modeling 144

REST Service Centralization and Normalization 146

9.2 REST Service Modeling 147

REST Service Capability Granularity 148

Resources vs. Entities 149

REST Service Modeling Process 150

Case Study Example 152

Step 1: Decompose Business Process (into Granular Actions) 152

Case Study Example 152

Step 2: Filter Out Unsuitable Actions 154

Case Study Example 154

Step 3: Identify Agnostic Service Candidates 155

Case Study Example 157

Event Service Candidate (Entity) 157

Award Service Candidate (Entity) 158

Student Service Candidate (Entity) 158

Notification Service Candidate (Utility) 159

Document Service Candidate (Utility) 159

Step 4: Identify Process-Specific Logic 160

Case Study Example 160

Confer Student Award Service Candidate (Task) 161

Step 5: Identify Resources 161

Case Study Example 162

Step 6: Associate Service Capabilities with Resources and Methods 163

Case Study Example 164

Confer Student Award Service Candidate (Task) 164

Event Service Candidate (Entity) 164

Award Service Candidate (Entity) 165

Student Service Candidate (Entity) 165

Notification Service Candidate (Utility) 166

Document Service Candidate (Utility) 166

Step 7: Apply Service-Orientation 167

Case Study Example 167

Step 8: Identify Candidate Service Compositions 167

Case Study Example 168

Step 9: Analyze Processing Requirements 169

Step 10: Define Utility Service Candidates 170

Step 11: Associate Utility-Centric Service Capabilities with Resources and Methods 171

Step 12: Apply Service-Orientation 171

Step 13: Revise Candidate Service Compositions 171

Step 14: Revise Resource Definitions 171

Step 15: Revise Capability Candidate Grouping 172

Additional Considerations 172

Chapter 10: Service-Oriented Design with REST 173

10.1 Uniform Contract Design Considerations 175

Designing and Standardizing Methods 175

Designing and Standardizing HTTP Headers 177

Designing and Standardizing HTTP Response Codes 179

Customizing Response Codes 184

Designing Media Types 186

Designing Schemas for Media Types 188

Service-Specific XML Schemas 189

10.2 REST Service Contract Design 191

Designing Services Based on Service Models 191

Task Services 191

Entity Services 192

Utility Services 193

Designing and Standardizing Resource Identifiers 194

Service Names in Resource Identifiers 195

Other URI Components 196

Resource Identifier Overlap 197

Resource Identifier Design Guidelines 199

Designing with and Standardizing REST Constraints 201

Stateless 201

Cache 202

Uniform Contract 203

Layered System 204

Case Study Example 205

Confer Student Award Service Contract (Task) 205

Event Service Contract (Entity) 207

Award Service Contract (Entity) 207

Student Transcript Service Contract (Entity) 208

Notification and Document Service Contracts (Utility) 209

10.3 Complex Method Design 211

Stateless Complex Methods 214

Fetch Method 214

Store Method 215

Delta Method 217

Async Method 219

Stateful Complex Methods 221

Trans Method 221

PubSub Method 222

Case Study Example 224

OptLock Complex Method 224

PesLock Complex Method 226

Part IV: Service Composition with REST

Chapter 11: Fundamental Service Composition with REST 231

11.1 Service Composition Terminology 233

Compositions and Composition Instances 233

Composition Members and Controllers 234

Service Compositions Are Actually Service Capability Compositions 235

Designated Controllers 236

Collective Composability 236

Service Activities 238

Composition Initiators 239

Point-to-Point Data Exchanges and Compositions 240

11.2 Service Composition Design Influences 241

Service-Orientation Principles and Composition Design 241

Standardized Service Contract and the Uniform Contract 242

Service Loose Coupling and the Uniform Contract 243

Service Abstraction and Composition Information Hiding 244

Service Reusability for Repeatable Composition 245

Service Autonomy and Composition Autonomy Loss 245

Service Statelessness and Stateless 246

Service Composability and Service-Orientation 246

REST Constraints and Composition Design 247

Stateless and Stateful Compositions 247

Cache and Layered System 248

Code-on-Demand and Composition Logic Deferral 248

Uniform Contract and Composition Coupling 248

11.3 Composition Hierarchies and Layers 249

Task Services Composing Entity Services 250

Entity Services Composing Entity Services 251

11.4 REST Service Composition Design Considerations 253

Synchronous and Asynchronous Service Compositions 253

Idempotent Service Activities 254

Lingering Composition State 255

Binding Between Composition Participants 255

11.5 A Step-by-Step Service Activity 258

1. Request to Purchase a Ticket 258

2. Verify the Requested Flight Details 258

3. Confirm a Seat on the Flight 259

4. Generate an Invoice 259

5. Create the Ticket 260

Summary 260

Chapter 12: Advanced Service Composition with REST 261

12.1 Service Compositions and Stateless 263

Composition Design with Service Statelessness 264

Composition Design with Stateless 265

12.2 Cross-Service Transactions with REST 266

REST-Friendly Atomic Service Transactions 267

Phase 1: Initialize 267

Phase 2: Reserve 268

Phase 3A: Confirm 269

Phase 3B: Cancel 269

Phase 3C: Timeout 270

Compliance with Stateless 271

Additional Considerations 272

REST-Friendly Compensating Service Transactions 272

Phase 1: Begin 273

Phase 2: Do 273

Phase 3A: Complete 274

Phase 3B: Undo 274

Phase 3C: Timeout 275

Compliance with Stateless 276

Additional Considerations 276

Non-REST-Friendly Atomic Service Transactions 276

Phase 1: Initialize 277

Phase 2: Do 277

Phase 3: Prepare 278

Phase 4A: Commit 279

Phase 4B: Rollback 279

Phase 4C: Timeout 280

Compliance with Stateless 280

Additional Considerations 281

12.3 Event-Driven Interactions with REST 282

Event-Driven Messaging 282

Compliance with Stateless 283

Message Polling 285

Compliance with Stateless 287

12.4 Service Composition with Dynamic Binding and Logic Deferral 288

Denormalized Capabilities Across Normalized Services 289

Composition Deepening 292

Dynamically Binding with Common Properties 294

Runtime Logic Deferral 297

12.5 Service Composition Across Service Inventories 299

Inventory Endpoint with REST 299

Dynamic Binding Between Service Inventories with Baseline Standardization 302

Chapter 13: Service Composition with REST Case Study 305

13.1 Revisiting the Confer Student Award Process 306

13.2 Application Submission and Task Service Invocation 310

13.3 Confer Student Award Service Composition Instance (Pre-Review Service Activity View) 312

Step 1: Composition Initiator to Confer Student Award Task Service (A) 312

Step 2: Confer Student Award Task Service to Event Entity Service (B) 312

Step 3: Event Entity Service to Confer Student Award Task Service (B) 313

Step 4: Confer Student Award Task Service to Award Entity Service (E) 314

Step 5: Award Entity Service to Confer Student Award Task Service (E) 314

Step 6: Confer Student Award Task Service to Award Entity Service (E) 314

Step 7: Award Entity Service to Confer Student Award Task Service (E) 315

Step 8: Confer Student Award Task Service to Student Entity Service (F) 315

Step 9: Student Entity Service to Confer Student Award Task Service (F) 315

Step 10: Confer Student Award Task Service to Student Transcript Entity Service (F) 316

Step 11: Student Transcript Entity Service to Confer Student Award Task Service (F) 316

Step 12: Confer Student Award Task Service to Composition Initiator 316

13.4 Review of Pending Applications and Task Service Invocation 317

Confer Student Award Service Composition Instance (Post-Review Service Activity View) 318

Step 1: Composition Initiator to Confer Student Award Task Service (L) 320

Step 2: Confer Student Award Task Service to Notification Utility Service (N) 320

Step 3: Notification Utility Service to Student Entity Service (N) 320

Step 4: Student Entity Service to Notification Utility Service (N) 320

Step 5: Notification Utility Service to Confer Student Award Task Service (N) 321

Intermediate Step: Confer Student Award Task Service to Transaction Coordinator (P, Q) 321

Intermediate Step: Transaction Coordinator to Confer Student Award Task Service (P, Q) 321

Step 6: Confer Student Award Task Service to Conferral Entity Service (P) 322

Intermediate Step: Conferral Entity Service to Transaction Coordinator (P) 322

Intermediate Step: Transaction Coordinator to Conferral Entity Service 322

Step 7: Conferral Entity Service to Confer Student Award Task Service (Q) 322

Step 8: Confer Student Award Task Service to Student Manuscript Entity Service (Q) 323

Intermediate Step: Student Transcript Entity Service to Transaction Controller (Q) 323

Intermediate Step: Transaction Controller to Student Transcript Entity Service (Q) 323

Step 9: Student Transcript Entity Service to Confer Student Award Task Service (Q) 324

Intermediate Step: Confer Student Award Task Service to Transaction Coordinator (P, Q) 324

Intermediate Step: Transaction Coordinator to Confer Student Award Task Service (P, Q) 324

Step 10: Confer Student Award Task Service to Composition Initiator 324

Part V: Supplemental

Chapter 14: Design Patterns for SOA with REST 327

14.1 REST-Inspired SOA Design Patterns 329

Content Negotiation 331

Related Patterns 332

Related Service-Oriented Computing Goals 332

Endpoint Redirection 332

Related Patterns 333

Related Service-Oriented Computing Goals 333

Entity Linking 333

Related Patterns 335

Related Service-Oriented Computing Goals 335

Idempotent Capability 335

Related Patterns 335

Related Service-Oriented Computing Goals 335

Lightweight Endpoint 336

Related Patterns 337

Related Service-Oriented Computing Goals 337

Reusable Contract 338

Related Patterns 338

Related Service-Oriented Computing Goals 339

Uniform Contract 339

14.2 Other Relevant SOA Design Patterns 340

Contract Centralization 340

Contract Denormalization 340

Domain Inventory 340

Schema Centralization 341

State Messaging 341

Validation Abstraction 342

Chapter 15: Service Versioning with REST 343

15.1 Versioning Basics 346

REST Service Contract Compatibility 346

Compatible and Incompatible Changes 348

Uniform Contract Method Compatibility 349

Uniform Contract Media Type Compatibility 350

Media Types and Forwards-compatibility 354

15.2 Version Identifiers 355

Using Version Identifiers 356

Version Identifiers and the Uniform Contract 358

Chapter 16: Uniform Contract Profiles 361

16.1 Uniform Contract Profile Template 362

Uniform-Level Structure 363

Method Profile Structure 364

Media Type Profile Structure 365

16.2 REST Service Profile Considerations 367

16.3 Case Study Example 369

Uniform-Level Structure: MUAUC 370

Method Profile Structure: Fetch 371

Response Code Handling for GET Methods in Fetch Method 373

Method Profile Structure: Store 374

Response Code Handling for PUT and DELETE Methods in Store Method 376

Method Profile Structure: GET 377

Method Profile Structure: PUT 378

Media Type Profile Structure: Invoice (application/ 379

Part VI: Appendices

Appendix A: Case Study Conclusion 383

Appendix B: Industry Standards Supporting the Web 387

The Internet Engineering Taskforce (IETF) 388

The World Wide Web Consortium 389

Other Web Standards 390

Appendix C: REST Constraints Reference 391

Appendix D: Service-Orientation Principles Reference 409

Appendix E: SOA Design Patterns Reference 425

Appendix F: State Concepts and Types 521

State Management Explained 522

State Management in Abstract 522

Origins of State Management 523

Deferral vs. Delegation 527

Types of State 527

Active and Passive 527

Stateless and Stateful 528

Session and Context Data 528

Measuring Service Statelessness 530

Appendix G: The Annotated SOA Manifesto 533

Appendix H: Additional Resources 547 548

Bibliography and References 548

Resources 551 551, 551 552 552 552, 552,, 552 552

About the Authors 553

About the Pattern Co-Contributors 555

About the Foreword Contributor 557

Index 559

Dateiformat: ePUB
Kopierschutz: Adobe-DRM (Digital Rights Management)


Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Bitte beachten Sie bei der Verwendung der Lese-Software Adobe Digital Editions: wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!

Weitere Informationen finden Sie in unserer E-Book Hilfe.

Download (sofort verfügbar)

25,49 €
inkl. 7% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe-DRM
siehe Systemvoraussetzungen
E-Book bestellen