Home > Store > Web Services

SOA with REST: Principles, Patterns & Constraints for Building Enterprise Solutions with REST

SOA with REST: Principles, Patterns & Constraints for Building Enterprise Solutions with REST

eBook (Watermarked)

  • Your Price: $35.19
  • List Price: $43.99
  • Includes EPUB, MOBI, and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    MOBI MOBI The eBook format compatible with the Amazon Kindle and Amazon Kindle applications.

    Adobe Reader PDF The popular standard, used most often with the free Adobe® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discretely watermarking it with your name, making it uniquely yours.

Also available in other formats.

Register your product to gain access to bonus material or receive a coupon.

Description

  • Copyright 2013
  • Edition: 1st
  • eBook (Watermarked)
  • ISBN-10: 0-13-286993-4
  • ISBN-13: 978-0-13-286993-5

 “This book illuminates the connection of the two domains--SOA and REST--in a manner that is concrete and practical, providing concise application to everyday architectural challenges. Fantastic!”

--Ryan Frazier, Technology Strategist, Microsoft

“...a tour de force that elegantly applies REST principles to the industry-standard SOA framework described in prior titles in this series.... This book is a must-read for anyone developing REST services.”

--Dave Slotnick, Enterprise Architect, Rackspace Hosting

“This book undoubtedly will help SOA to reap the benefits from the main value propositions of Web architecture….”

--Dr. Erik Wilde, Architect, EMC Corporation

“REST is so much more than just another type of interface implementation--SOA with REST shows how the ecosystem of service compositions changes as new opportunities arise for service composition architecture designs. A comprehensive guide and a must-read for any serious IT architect considering REST-style services for application architectures.”

--Roger Stoffers, Solution Architect, Hewlett Packard

“Service-orientation and REST both are architectural styles that are cornerstones of modern applications and cloud computing. Both aim to deliver scalable, interoperable solutions, but their different roots don’t always make them a natural fit. SOA with REST explains how the two styles can work together in enterprise environments. It discusses a design process for a services portfolio that meets the goals of SOA and at the same time designs services that comply with the established REST constraints. It also shows pragmatic approaches to meet enterprise-grade requirements with the REST programming style but relaxes constraints where necessary.”

--Christoph Schittko, Director of Cloud Strategy, Microsoft

“An excellent repertoire of service-oriented patterns that will prove handy when solving problems in the real world. The REST perspectives and principles will provide complete coverage of modern-day Web 2.0 style approaches. Highly recommended.”

--Sid Sanyal, IT Architect, Zurich Financial Services

“An inspirational book that provides deep insight into the design and development of next-generation service-oriented systems based on the use of REST. This book clarifies the convergence of SOA and REST with no-nonsense content that addresses common questions and issues head-on. An essential ‘instrument of modern service implementation’ and a powerful body of knowledge for software designers, architects, and consultants.”

--Pethuru Raj, Ph.D., Enterprise Architecture (EA) Consultant, Wipro Consulting Services

“REST and SOA are two of the most misunderstood terms in the software industry over the past decade. Yet the REST architectural style coupled with modern RESTful framework implementations provides a scalable and reliable approach to SOA. This book covers all you need to know about how to take the principles of REST and apply them in small and large SOA developments. If you are familiar with REST and thinking about SOA, then you need this book. If you have not considered REST in your SOA work, then this book is for you, too. Covering concepts of both REST and SOA, as well as design patterns and when to use them, the book is a wonderful companion and a good tool for architects and engineers.”

--Dr. Mark Little, CTO JBoss, Red Hat

“Unlike many other texts on the subject, SOA with REST is a well-rounded, easy-to-read narrative, including real-world case studies that appeal to both developers and analysts. This makes it an indispensable source for any SOA practitioner or any professional who is planning to initiate an SOA project.”

--Theodore T. Morrison, Certified SOA Analyst, CSM, Geocent, LLC

“SOA and REST are two very important architectural styles for distributed computing. SOA is successfully adopted by most enterprises, and the REST style is getting more attention from both researcher and industry users. The book SOA with REST introduces a new architectural style that is ingeniously combining both SOA and REST styles and clearly reveals how SOA and REST can work together to generate successful enterprise SOA strategies with REST, along with guidance for making architecture design decisions. This book is a bible of best practices for designing and implementing SOA architecture with REST. It is a must-have reference book for both IT practitioners and researchers.”

--Longji Tang, FedEx IT Senior Technical Advisor, Ph.D. in CSSE

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 book will be valuable to IT architects, developers, and any practitioner seeking to use SOA and REST together.

Topic Areas

  • Distributed solution design with HTTP and REST
  • REST-based service composition architectures
  • REST service modeling and a service-oriented analysis process for REST service candidates
  • Technical service contract notation for REST services based on a uniform contract
  • Designing REST service contracts with service-orientation
  • Understanding REST constraints in relation to service-orientation principles
  • Using hypermedia and dynamic binding within SOA and service compositions
  • Creating complex HTTP-based methods for enterprise solutions
  • Advanced design techniques, including composition deepening, runtime logic deferral, and dynamic binding with common properties
  • Cross-service transactions and event-driven messaging with REST
  • Addressing enterprise solution concerns in relation to REST-based state management
  • Applying SOA design patterns to REST-based solutions
  • Distinguishing REST and SOA service concepts and terminology
  • Designing REST architectures with SOA
  • Versioning REST services and uniform contracts
  • Fundamental REST, SOA, and service-orientation concepts and terminology
  • REST constraints, REST architectural goals, and properties
  • Seven new REST-inspired design patterns
  • Defining common goals of REST and SOA

Sample Content

Table of Contents

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 (www.servicetechbooks.com)      10

Master Glossary (www.soaglossary.com)      10

Service-Orientation (www.serviceorientation.com)      10

What Is REST? (www.whatisrest.com)      10

Referenced Specifications (www.servicetechspecs.com)      10

The Service Technology Magazine (www.servicetechmag.com)      10

SOASchool.com SOA Certified Professional (SOACP)      11

CloudSchool.com 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/vnd.edu.mua.invoice+xml)      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

www.whatisrest.com     548

Bibliography and References     548

Resources     551

www.servicetechbooks.com     551

www.soaschool.com, www.cloudschool.com     551

www.servicetechmag.com     552

www.soaglossary.com     552

www.servicetechspecs.com     552

www.soapatterns.org, www.cloudpatterns.org     552

www.serviceorientation.com, www.soaprinciples.com, www.whatissoa.com     552

www.servicetechsymposium.com     552

About the Authors     553

About the Pattern Co-Contributors     555

About the Foreword Contributor     557

Index     559

Updates

Submit Errata

More Information

ONE MONTH ACCESS!

WITH PURCHASE


Get unlimited 30-day access to thousands of Books & Training Videos about technology, professional development and digital media If you continue your subscription after your 30-day trial, you can receive 30% off a monthly subscription to the Safari Library for up to 12 months.