This book is dedicated to Alex Blewitt, who unfortunately passed away before publication. We would like to thank Alex for his candid feedback, constant support, and warm friendship over the years.
Foreword
When I built my first APIs at the Financial Times, over a decade ago, there werent too many of them. We were building on a monolithic architecture, and the APIs were solely there for external third parties to get access to our content.
Now though, APIs are everywhere and they are core to your success when building a system.
Thats because, over the last decade, a couple of things have combined to change the way many of us do software development.
Firstly, the technology available for us changed. The rise of cloud computing gave us self-service, on-demand provisioning. Automated build and deployment pipelines allowed us to do continuous integration and deployment, and containers and associated technologies like orchestration let us run large numbers of small, independent services as a distributed system.
Why are we doing that? Because of the second thing: the research showing that successful software development organizations have loosely coupled architectures and autonomous, empowered teams. Successful here is defined in terms of a positive impact on the business: increased market share, productivity, and profitability.
Our architectures now tend to be more loosely coupled, distributed, and built around APIs. You want your APIs to be discoverable, consistent, and unlikely to cause problems to the consumers even if they change unexpectedly or disappear. Anything else will couple work together and slow down your teams.
In this book, James, Daniel and Matthew provide a comprehensive and practical guide to building effective API architectures. They cover a lot of ground, from how to build and test an individual API, through the ecosystem you deploy them into, the ways to release and operate them effectively, and perhaps most importantly, how to use APIs to evolve your architecture. Those first APIs I built at the Financial Times dont exist anymore, and we built those systems again from scratch. Thats costly. James, Daniel, and Matthew provide a template for how to deal with inevitable change and evolve your systems, using APIs as a key tool.
Software architecture has been defined as those decisions that are both important and hard to change. These are the decisions that will make your project succeedor fail.
The authors focus is not on architecture in the abstract, but on how you apply architecture within your own organizations. Deciding to adopt an API gateway or a service mesh, and which one, is exactly the kind of hard-to-undo decision that you should approach with caution and evaluate carefully. James, Daniel, and Matthew give strong, opinionated guidance where they feel it is appropriate, and where the options are less clearcut, they provide a framework to help you make the best choice for your circumstances.
They illustrate throughout with a practical and realistic case study that takes the concepts and shows how you actually make them work in practice. Their case study evolves throughout the book, in the same way real systems do. The authors show that you dont have to do everything upfront; you can evolve your architecture piece by piece, extracting services and adding tools like API gateways and service meshes as you find you need them.
When I built my first APIs, I made a lot of mistakes. I wish Id had a book like this, to help me understand where I might trip up, and to guide me towards sensible decisions.
I recommend this book to anyone leading work on systems where APIs play a major role. With it, you should be able to develop a consistent set of tools and standards to support every team building APIs in your organization.
Sarah Wells, Co-Chair of the QCon London conference, independent consultant, andformer Technical Director at the Financial Times , Reading, UK, September 2022
Preface
Why Did We Write This Book?
In early 2020 we attended OReilly Software Architecture in New York, where Jim and Matt gave a workshop on APIs and a presentation on API gateways.Jim and Daniel know each other from the London Java Community, and like at many architecture events, we got together to talk about our thoughts and understanding around API architectures.As we were talking on the hallway track, several conference delegates came up to us and chatted about their experiences with APIs.People were asking for our thoughts and guidance on their API journey.It was at this point that we thought writing a book on the topic of APIs would help share our discussions from conferences with other architects.
Why Should You Read This Book?
This book has been designed to provide a complete picture on designing, operating, and evolving an API architecture.We have shared our experience and advice through both our writing and an accompanying case study that mimics a real-life event-management conference system that enables attendees to view and book presentation sessions.The case study runs throughout the book, with the goal of you exploring how abstract concepts sometimes translate into practical application.If you want a high-level overview of the evolution of the case study, you can find this in .
We also believe in allowing you to make your own decisions. To support this, we will: