Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Presentation

Mastering API Architecture

Rating
-
Sold
-
Pages
226
Uploaded on
18-07-2024
Written in
2017/2018

"Most organizations with a web presence build and operate APIs; the doorway for customers to interact with the company''''s services. Designing, building, and managing these critical programs affect everyone in the organization, from engineers and product owners to C-suite executives. But the real challenge for developers and solution architects is creating an API platform from the ground up. With this practical book, you''''ll learn strategies for building and testing REST APIs that use API gateways to combine offerings at the microservice level. Authors James Gough, Daniel Bryant, and Matthew Auburn demonstrate how simple additions to this infrastructure can help engineers and organizations migrate to the cloud; and open the opportunity to connect internal services using technologies like a service mesh. Learn API fundamentals and architectural patterns for building an API platform Use practical examples to understand how to design, build, and test API-based systems Deploy, operate, and configure key components of an API platform Use API gateways and service meshes appropriately, based on case studies Understand core security and common vulnerabilities in API architecture Secure data and APIs using threat modeling and technologies like OAuth2 and TLS Learn how to evolve existing systems toward API- and cloud-based architectures"

Show more Read less
Institution
Course

Content preview

,Introduction
In this introduction, you will discover the basics of APIs and their potential to be part of the
architecture journey. We will introduce a lightweight definition for APIs and their use in and out
of process. In order to demonstrate the importance of APIs, we will introduce the conference
system case study, a running example that will evolve throughout the book. Out-of-process APIs
allow you to think beyond a simple three-tiered architecture; we will introduce traffic patterns and
their importance to demonstrate this. We will outline a summary of the case study steps, allowing
you to skip ahead if an area is of interest to you straight away.

In order to present APIs and their associated ecosystem, we will use a series of important artifacts.
We will introduce the case study with C4 model diagrams and revisit the specifics and logic behind
the approach. You will also learn about the use of Architecture Decision Records (ADRs) and the
value of clearly defining decisions across the software lifecycle. As the introduction closes, we
will outline ADR Guidelines—our approach to help you make decisions when the answer is “it
depends.”


The Architecture Journey
Anyone who has taken a long journey will no doubt have encountered the question (and possibly
persistently) “are we there yet?” For the first few inquiries, you look at the GPS or a route planner
and provide an estimate—hoping that you don’t encounter any delays along the way. Similarly,
the journey to building API-based architectures can be complex for developers and architects to
navigate; even if there was an Architecture GPS, what would your destination be?

Architecture is a journey without a destination, and you cannot predict how technologies and
architectural approaches will change. For example, you may not have been able to predict service
mesh technology would become so widely used, but once you learn about its capabilities it may
cause you to think about evolving your existing architecture. It is not only technologies that
influence change in architecture; new business requirements and constraints also drive change in
architectural direction.

The culminating effect of delivering incremental value combined with new emerging technologies
leads to the concept of evolutionary architecture. Evolutionary architecture is an approach to
incrementally changing an architecture, focusing on the ability to change with speed and reducing
the risk of negative impacts. Along the way, we ask you to keep the following advice in
approaching API architecture in mind:

Though architects like to be able to strategically plan for the future, the constantly changing
software development ecosystem makes that difficult. Since we can’t avoid change, we need to
exploit it.

Building Evolutionary Architectures by Neal Ford, Rebecca Parsons, and Patrick Kua (O’Reilly)

,In many projects APIs themselves are evolutionary, requiring change as more systems and services
are integrated. Most developers have built services that focus on a single function without
considering the broader API reuse from a consumer perspective.

API-First design is an approach where developers and architects consider the functionality of their
service and design an API in a consumer-centric manner. The API consumer could be a mobile
application, another service, or even an external customer. In Chapter 1 we will review design
techniques to support an API-First approach and discover how we build APIs that are durable to
change and deliver value to a broad consumer base.

The good news is that you can start an API-driven architecture journey at any point. If you are
responsible for preexisting technical inventory, we will show you techniques to evolve your
architecture to promote the use of APIs in your platform. On the other hand, if you are lucky and
have a blank canvas to work with, we will share with you the benefit of adopting API architectures
based on our years of experience, while also highlighting key factors in decision making.


A Brief Introduction to APIs
In the field of software architecture, there are a handful of terms that are incredibly difficult to
define. The term API, which stands for application programming interface, falls into this
categorization, as the concept first surfaced as many as 80 years ago. Terms that have been around
for a significant amount of time end up being overused and having multiple meanings in different
problem spaces. We consider an API to mean the following:

 An API represents an abstraction of the underlying implementation.
 An API is represented by a specification that introduces types. Developers can
understand the specifications and use tooling to generate code in multiple languages
to implement an API consumer (software that consumes an API).
 An API has defined semantics or behavior to effectively model the exchange of
information.
 Effective API design enables extension to customers or third parties for a business
integration.

Broadly speaking, APIs can be broken into two general categories depending on whether the API
invocation is in process or out of process. The process being referred to here is an operating
system (OS) process. For example, a Java method invocation from one class to another is an in-
process API invocation, as the call is handled by the same process from which the call was made.
A .NET application invocating an external REST-like API using an HTTP library is an out-of-
process API invocation, as the call is handled by an additional external process other than the
process from which the call was made. Typically, an out-of-process API call will involve data
traversing a network, potentially a local network, virtual private cloud (VPC) network, or the
internet. We will focus on the latter style of APIs; however, architects will often encounter the
requirement to remodel an in-process API to an out-of-process API. In order to demonstrate this
concept (and others), we will create a running case study that will evolve throughout the book.

, Running Example: Conference System Case
Study
We have chosen to model a conference system for our case study because the domain is easily
recognizable but also provides enough complexity for modeling an evolutionary
architecture. Figure I-1 visualizes the conference system at the top level, allowing us to set the
context of the architecture under discussion. The system is used by an external customer to create
their attendee account, review the conference sessions available, and book their attendance.




Figure I-1. C4 conference system context diagram


Let’s zoom in to the conference system box in Figure I-2. Expanding the conference system
provides us more detail about its major technical building blocks. The customer interacts with the
web application, which invokes APIs on the conference application. The conference application
uses SQL to query the backing datastore.




Figure I-2. C4 conference system container diagram


Figure I-2 reveals that from an API perspective the most interesting functionality is within the
conference application container. Figure I-3 zooms in to this specific container, allowing you to
explore the structure and interactions.

Four major components and the database are involved in the current system. The API
Controller faces all incoming traffic from the UI and makes a decision about where to route the
request in the system. This component would also be responsible for marshaling from the on the
wire network-level representation to an object or representation in code. The API Controller
component is intriguing from the perspective of in-process routing and acting as a junction
point or front controller pattern. For API requests and processing, this is an important pattern; all

Written for

Course

Document information

Uploaded on
July 18, 2024
Number of pages
226
Written in
2017/2018
Type
PRESENTATION
Person
Unknown

Subjects

$4.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
RobertCuong

Get to know the seller

Seller avatar
RobertCuong Telecommunication
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
225
Last sold
-
GPON and WiFi

+ SDH solution based on Fujitsu/Alcatel/Huawei devices in deployment and troubleshoot + Switching and Routing network fundamental and advance + GPON solution with deep knowledge of PLOAM/OMCI, activation procedure. Analysis of Private/Public OMCI + WiFi solution with WiFi Management/Control/Data. WiFi bandsteering, WiFi mesh, and WiFi 6, 6E, 7, ...

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions