Book description
Many organizations today orchestrate and maintain apps that rely on other people's services. Software designers, developers, and architects in those companies often work to coordinate and maintain apps based on existing microservices, including third-party services that run outside their ecosystem. This cookbook provides proven recipes to help you get those many disparate parts to work together in your network.
Author Mike Amundsen provides step-by-step solutions for finding, connecting, and maintaining applications designed and built by people outside the organization. Whether you're working on human-centric mobile apps or creating high-powered machine-to-machine solutions, this guide shows you the rules, routines, commands, and protocols—the glue—that integrates individual microservices so they can function together in a safe, scalable, and reliable way.
- Design and build individual microservices that can successfully interact on the open web
- Increase interoperability by designing services that share a common understanding
- Build client applications that can adapt to evolving services without breaking
- Create resilient and reliable microservices that support peer-to-peer interactions on the web
- Use web-based service registries to support runtime "find-and-bind" operations that manage external dependencies in real time
- Implement stable workflows to accomplish complex, multiservice tasks consistently
Publisher resources
Table of contents
- Foreword
- Preface
- Understanding RESTful Hypermedia
- 1. Introducing RESTful Web APIs
- 2. Thinking and Designing in Hypermedia
- Hypermedia Recipe Catalog
-
3. Hypermedia Design
- 3.1. Creating Interoperability with Registered Media Types
- 3.2. Ensuring Future Compatibility with Structured Media Types
- 3.3. Sharing Domain Specifics via Published Vocabularies
- 3.4. Describing Problem Spaces with Semantic Profiles
- 3.5. Expressing Actions at Runtime with Embedded Hypermedia
- 3.6. Designing Consistent Data Writes with Idempotent Actions
- 3.7. Enabling Interoperability with Inter-Service State Transfers
- 3.8. Designing for Repeatable Actions
- 3.9. Designing for Reversible Actions
- 3.10. Designing for Extensible Messages
- 3.11. Designing for Modifiable Interfaces
-
4. Hypermedia Clients
- 4.1. Limiting the Use of Hardcoded URLs
- 4.2. Coding Clients to Be HTTP Aware
- 4.3. Coding Resilient Clients with Message-Centric Implementations
- 4.4. Coding Effective Clients to Understand Vocabulary Profiles
- 4.5. Negotiating for Profile Support at Runtime
- 4.6. Managing Representation Formats at Runtime
- 4.7. Using Schema Documents as a Source of Message Metadata
- 4.8. Every Important Element Within a Response Needs an Identifier
- 4.9. Relying on Hypermedia Controls in the Response
- 4.10. Supporting Links and Forms for Nonhypermedia Services
- 4.11. Validating Data Properties at Runtime
- 4.12. Using Document Schemas to Validate Outgoing Messages
- 4.13. Using Document Queries to Validate Incoming Messages
- 4.14. Validating Incoming Data
- 4.15. Maintaining Your Own State
- 4.16. Having a Goal in Mind
-
5. Hypermedia Services
- 5.1. Publishing at Least One Stable URL
- 5.2. Preventing Internal Model Leaks
- 5.3. Converting Internal Models to External Messages
- 5.4. Expressing Internal Functions as External Actions
- 5.5. Advertising Support for Client Response Preferences
- 5.6. Supporting HTTP Content Negotiation
- 5.7. Publishing Complete Vocabularies for Machine Clients
- 5.8. Supporting Shared Vocabularies in Standard Formats
- 5.9. Publishing Service Definition Documents
- 5.10. Publishing API Metadata
- 5.11. Supporting Service Health Monitoring
- 5.12. Standardizing Error Reporting
- 5.13. Improving Service Discoverability with a Runtime Service Registry
- 5.14. Increasing Throughput with Client-Supplied Identifiers
- 5.15. Improving Reliability with Idempotent Create
- 5.16. Providing Runtime Fallbacks for Dependent Services
- 5.17. Using Semantic Proxies to Access Noncompliant Services
-
6. Distributed Data
- 6.1. Hiding Your Data Storage Internals
- 6.2. Making All Changes Idempotent
- 6.3. Hiding Data Relationships for External Actions
- 6.4. Leveraging HTTP URLs to Support âContainsâ and âANDâ Queries
- 6.5. Returning Metadata for Query Responses
- 6.6. Returning HTTP 200 Versus HTTP 400 for Data-Centric Queries
- 6.7. Using Media Types for Data Queries
- 6.8. Ignoring Unknown Data Fields
- 6.9. Improving Performance with Caching Directives
- 6.10. Modifying Data Models in Production
- 6.11. Extending Remote Data Stores
- 6.12. Limiting Large-Scale Responses
- 6.13. Using Pass-Through Proxies for Data Exchange
-
7. Hypermedia Workflow
- 7.1. Designing Workflow-Compliant Services
- 7.2. Supporting Shared State for Workflows
- 7.3. Describing Workflow as Code
- 7.4. Describing Workflow as DSL
- 7.5. Describing Workflow as Documents
- 7.6. Supporting RESTful Job Control Language
- 7.7. Exposing a Progress Resource for Your Workflows
- 7.8. Returning All Related Actions
- 7.9. Returning Most Recently Used Resources
- 7.10. Supporting Stateful Work in Progress
- 7.11. Enabling Standard List Navigation
- 7.12. Supporting Partial Form Submit
- 7.13. Using State-Watch to Enable Client-Driven Workflow
- 7.14. Optimizing Queries with Stored Replays
- 7.15. Synchronous Reply for Incomplete Work with 202 Accepted
- 7.16. Short-Term Fixes with Automatic Retries
- 7.17. Supporting Local Undo or Rollback
- 7.18. Calling for Help
- 7.19. Scaling Workflow with Queues and Clusters
- 7.20. Using Workflow Proxies to Enlist Noncompliant Services
- 8. Closing Remarks
- Guiding Principles of RESTful Web APIs
- Additional Reading
- Related Standards
- Using the HyperCLI
- Index
- About the Author
Product information
- Title: RESTful Web API Patterns and Practices Cookbook
- Author(s):
- Release date: October 2022
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781098106744
You might also like
book
Hands-On RESTful API Design Patterns and Best Practices
Build effective RESTful APIs for enterprise with design patterns and REST framework's out-of-the-box capabilities Key Features …
book
RESTful Web APIs
The popularity of REST in recent years has led to tremendous growth in almost-RESTful APIs that …
book
Principles of Web API Design: Delivering Value with APIs and Microservices
The Full-Lifecycle Guide to API Design brings together principles and processes to help you succeed across …
book
Microservice APIs
Strategies, best practices, and patterns that will help you design resilient microservices architecture and streamline your …