Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Mike Amundsen

Rating No ratings yet

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

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
# RESTful Web API Patterns and Practices Cookbook ## 【One-Line Pitch】 A practical recipe collection for designing, connecting, and orchestrating microservices that can reliably interact on the open web—essential reading for architects, developers, and technical leads building distributed systems that must survive constant change and unknown consumers. ## 【Book Arc】 - **Opening (~0%–6%)**: Introduces the core premise—building services for the open web means designing for people and systems you'll never meet. Establishes RESTful Web APIs (RWAs) and hypermedia as the foundation, with Fielding's architectural principles guiding the entire recipe collection. - **Early (~6%–19%)**: Explores the philosophy and design thinking behind hypermedia-driven systems. Covers shared principles for scalable web services, including the importance of ubiquitous language, statelessness, and designing for long-term evolution rather than immediate perfection. - **Early (~19%–28%)**: Delves into "a priori design"—establishing stable system elements before coding begins. Addresses the dependency problem head-on: how services can survive when other services break, change, or disappear, using hypermedia controls as "safe zones" of modifiability. - **Early (~28%–34%)**: Examines distributed data challenges, contrasting traditional systems of record (SOR) and single source of truth (SSOT) approaches with the reality that on the open web, data is always remote and always has multiple copies. Introduces workflow concepts including choreography versus orchestration. - **Middle (~34%–47%)**: Transitions into the practical recipe catalog, covering hypermedia design patterns: published vocabularies (Schema.org, Microformats, Dublin Core), state transfer mechanisms (forms, import/export operations, shared references), and reversibility strategies for updates. ## 【Key Takeaways】 - **Hypermedia is the key to modifiability** (Early): By embedding links and forms in API responses, services can change URLs, HTTP methods, and even message formats without breaking consumers. This creates "safe zones" where change is expected and manageable—design for evolution, not stability. - **Design for strangers** (Early): Since web services may be used by people you never meet, interfaces must be self-describing and carry all necessary context. Apply Eric Evans's ubiquitous language across services so intent is clear without explanation—statelessness means every request carries its own context. - **Assume data is always remote and duplicated** (Early): The open web makes it impossible to control where data lives or how many copies exist. Design for the reality that your copy of data isn't necessarily what others have—build for eventual consistency rather than fighting it. - **Published vocabularies ensure interoperability** (Middle): Using well-documented property names from sources like Schema.org, Microformats.org, or Dublin Core makes your service understandable to a wider audience. Keep vocabulary terms disconnected from software or hardware dependencies for long-term viability. - **Transfer state by value or by reference** (Middle): The simplest interoperation is passing exact state values via forms (by value). For more complex scenarios, share URLs pointing to data collections (by reference)—but this requires both services to agree on format and coordination ahead of time. - **Choreography beats orchestration for resilience** (Early): When each service knows only its own "moves" and workflows emerge from interactions, you get loosely coupled, resilient systems that are easier to modify over time. The trade-off: monitoring individual workflow progress becomes harder. - **Reversibility requires planning** (Middle): Simple updates can be rolled back with a second HTTP request (like another PUT with previous values), but when updates affect multiple records or services, you need more sophisticated approaches—design for reversibility before you need it. ## 【Reading Tips】 - **Skim Chapter 1–2 for philosophy, deep-read Part II for recipes**: The opening chapters establish the "why" behind hypermedia design—useful context but not actionable alone. The recipe catalog in Part II is where you'll find concrete solutions to apply immediately. - **Jump directly to relevant recipes**: This is a cookbook, not a novel. If you're building a client, go to Chapter 4; if you're designing services, start with Chapter 3. Each recipe follows a Problem/Solution format that stands alone. - **Pay special attention to the "See Also" cross-references**: Recipes are interconnected—following these links reveals how patterns combine to solve larger problems. This is where the real value of the cookbook emerges. - **Don't skip the vocabulary and media type recipes**: These seem administrative but are foundational for long-term interoperability. The caution about industry-specific vocabularies (some requiring payment) is worth heeding early in your design process. - **Take notes on the choreography vs. orchestration discussion**: This distinction (Chapter 2) shapes everything about how you'll approach workflow design. Understanding the trade-offs before you start building will save significant rework. ## 【Coverage Limits】 The excerpts cover the book's philosophy, design principles, and early recipe catalog (through approximately 47% of the book). Later recipes covering hypermedia clients, services, data patterns, and workflow implementations are referenced but not detailed in this guide. ##
Page 9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii About This Book xiii...
View in text
Excerpt 2
features that are rarely used persist for quite a long time. There are features of the HTML language (e.g., <mar quee>, <center>, <xmp>, etc.) that have been...
View in text
Excerpt 3
ultiple copies is an important point; one not to gloss over. Author and software architect Irakli Nadareishvili once expressed a sim‐ ilar “rule” to me when...
View in text
Excerpt 4
selected existing actions of the API. For example, you can arrange to accept inputs (via a FORM element) when creating a new user account. The preceding use...
View in text
Excerpt 5
een completely replaced more than once, there are multiple, competing editions of the browser from various vendors, and the features of HTML have changed ove...
View in text
Excerpt 6
to your application. // make request, pull body, and scrub var reponse = httpRequest(url, options); var message = filterResponse(response.body, filters.taxRu...
View in text
Excerpt 7
le for client applications via the HTTP OPTIONS method or a resource representation returned when following the "meta" link relation value (rel="meta"). See...
View in text
Excerpt 8
ut that responses for health checks are “dynamic”; the con‐ tents of the response may be customized based on the calling context. For example, anonymous requ...
View in text
Tags
AI categories
BackendWeb TechnologyProgramming
ISBN: 1098106741
Publisher: O'Reilly Media
Publish Year: 2022
Language: English
Pages: 469
File Format: PDF
File Size: 17.5 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…