

After spending time at multiple startups and 12 years at ThoughtWorks, Sam Newman is now an independent consultant.
Meer over Sam NewmanBuilding Microservices
Designing Fine-Grained Systems
Paperback Engels 2021 9781492034025Samenvatting
Distributed systems have become more fine-grained in the past 10 years, shifting from code-heavy monolithic applications to smaller, self-contained microservices. But developing these systems brings its own set of headaches. With lots of examples and practical advice, the second edition of this practical book takes a holistic view of the topics that system architects and administrators must consider when building, managing, and evolving microservice architectures.
Microservice technologies are moving quickly, and this revised edition gets you up to date with a new chapter on serverless and cloud-native applications, expanded coverage of user interfaces, more hands-on code examples, and other additions throughout the book. Author Sam Newman provides you with a firm grounding in the concepts while diving into current solutions for modeling, integrating, testing, deploying, and monitoring your own autonomous services. You'll follow a fictional company throughout the book to learn how building a microservice architecture affects a single domain.
Specificaties
Lezersrecensies
Inhoudsopgave
Microservices At a Glance
Key Concepts of Microservices
Independently Deployability
Modelled Around a Business Domain
Owning Their Own State
Size
Flexibility
Alignment of Architecture and Organization
The Monolith
The Single-Process Monolith
The Modular Monolith
The Distributed Monolith
Monoliths and Delivery Contention
Advantages of Monoliths
Enabling Technology
Log Aggregation and Distributed Tracing
Containers and Kubernetes
Streaming
Public Cloud and Serverless
Advantages of Microservices
Technology Heterogeneity
Robustness
Scaling
Ease of Deployment
Organizational Alignment
Composability
Microservice Pain Points
Developer Experience
Technology Overload
Reporting
Monitoring and Troubleshooting
Security
Testing
Latency
Data Consistency
Should I Use Microservices?
Who They Might Not Work For
Where They Work Well
Summary
2. How to Model Microservices
Introducing MusicCorp
What Makes a Good Microservice Boundary?
Information Hiding
Cohesion
Coupling
The Interplay of Coupling And Cohesion
Types Of Coupling
Domain Coupling
Pass Through Coupling
Common Coupling
Content Coupling
Alternatives to Domain-Oriented Decomposition
Volatility
Data
Technology
Organizational
Different Goals, Different Drivers
Mixing Models And Exceptions
Just Enough Domain-Driven Design
Ubiquitous Language
Aggregate
Bounded Context
Mapping Aggregates and Bounded Contexts to Microservices
Turtles All the Way Down
The Dangers Of Premature Decomposition
Communication in Terms of Business Concepts
Event-storming
Logistics
The Process
Summary
3. Microservice Communication Styles
From In-Process to Inter-Process
Performance
Changing Interfaces
Error handling
Technology for Inter-process Communication: So Many Choices
Styles of Microservice Communication
Pattern: Synchronous Blocking
Advantages
Disadvantages
Where To Use It
Pattern: Asynchronous Non-blocking
Advantages
Disadvantages
Where To Use It
Pattern: Communication Through Common Data
Implementation
Advantages
Disadvantages
Where To Use It
Pattern: Request-Response Communication
Implementation: Synchronous Versus Asynchronous
Where to Use It
Pattern: Event-Driven Communication
Implementation
What’s In an Event?
Did It Work?
Summary
4. Implementing Microservice Communication
Make Backwards Compatibility Easy
Make Your Interface Explicit
Keep Your APIs Technology-Agnostic
Make Your Service Simple for Consumers
Hide Internal Implementation Detail
Remote Procedure Calls
REST
GraphQL
Message Brokers
Serialization Formats
Textual Formats
Binary Formats
Schemas
Structural vs Semantic Contract Breakages
Should You Use Schemas?
Handling Change Between Microservices
Avoiding Breaking Changes
Expansion Changes
Tolerant Reader
Right Technology
Explicit Interface
Catch Accidental Breaking Changes Early
Managing Breaking Changes
Lock-Step Deployment
Coexist Incompatible Microservice Versions
Emulate The Old Interface
Which Approach Do I Prefer?
The Social Contract
Tracking Usage
Extreme Measures
DRY and the Perils of Code Reuse in a Microservice World
Sharing Code Via Libraries
Summary
5. Workflow
Transactions
ACID Transactions
Still ACID, but Lacking Atomicity?
Two-Phase Commits
Distributed Transactions—Just Say No
Sagas
Saga Failure Modes
Implementing Sagas
Sagas Versus Distributed Transactions
Summary
6. Build
A Brief Introduction to Continuous Integration
Are You Really Doing CI?
Branching Models
Build Pipelines and Continuous Delivery
Tooling
Tradeoffs and Environments
Artifact Creation
Mapping Source Code and Builds to Microservices
One Giant Repo, One Giant Build
Pattern: One Repository Per Microservice (aka Multi-Repo)
Pattern: Monorepo
Which Approach Would I Use?
Summary
7. Deployment
From Logical to Physical
Multiple Instances
The Database
Environments
Principles of Microservice Deployment
Isolated Execution
Focus On Automation
Infrastructure As Code
Zero-downtime Deployment
Desired State Management
Deployment Options
Physical Machines
Virtual Machines
Containers
Application Containers
Platform As A Service (PAAS)
Function As A Service (FAAS)
Which Deployment Option Is Right For You?
Kubernetes & Container Orchestration
The Case For Container Orchestration
A Simplified View Of Kubernetes Concepts
Multi-Tenancy and Federation
The Cloud Native Computing Federation
Platforms and Portability
Helm, Operations and CRDs, oh my!
And Knative
The Future
Should You Use It?
Progressive Delivery
Separating Deployment From Release
On To Progressive Delivery
Feature Toggles
Canary Release
Parallel Run
Summary
8. Testing
Types of Tests
Test Scope
Unit Tests
Service Tests
End-to-End Tests
Trade-Offs
Implementing Service Tests
Mocking or Stubbing
A Smarter Stub Service
Implementing (Those Tricky) End-to-End Tests
Flaky and Brittle Tests
Who Writes These End-to-End Tests?
How Long Should End-to-End Tests Run?
The Great Pile-up
The Metaversion
Independent Testability
Should You Avoid End-to-End tests
Consumer-Driven Contracts
The Final Word
Developer Experience
From Pre-Production to In-Production Testing
Types Of In-Production Testing
Making Testing In Production Safe
Cross-Functional Testing
Mean Time to Repair Over Mean Time Between Failures?
Performance Tests
Summary
9. From Monitoring to Observability
Single Microservice, Single Server
Single Microservice, Multiple Servers
Multiple Services, Multiple Servers
Observability vs Monitoring
The Pillars Of Observability? Not So Fast
Core Challenges
Log Aggregation
Common Format
Correlating Log Lines
Timing
Implementations
Shortcomings
Metrics Aggregation
Low vs High Cardinality
Implementations
Distributed Tracing
How It Works
Implementing Distributed Tracing
Are We Doing OK?
Service Level Agreements
Service Level Objectives
Service Level Indicators
Error Budgets
Alerting
Some Problems Are Worse Than Others
Alert Fatigue
Towards Better Alerting
Semantic Monitoring
Thinking Differently About System Health
Real User Monitoring
Synthetic Transactions
Implementing Synthetic Transactions
Testing In Production
A/B Testing
Canary Release
Parallel Run
Smoke Tests
Synthetic Transactions
Chaos Engineering
Standardization
Selecting Tools
Democratic
Easy To Integrate
Provide Context
Real-time
Suitable For Your Scale
The Expert In The Machine
Getting Started
Summary
10. User Interfaces
Toward Digital
Ownership Models
Drivers For Dedicated Frontend Teams
Towards Stream-Aligned Teams
Sharing Specialists
Ensuring Consistency
Working Through Technical Challenges
Pattern: Monolithic Frontned
When To Use It
Pattern: Micro Frontends
Implementation
When To Use It
Pattern: Page-Based Decomposition
Where To Use It
Pattern: Widget-Based Decomposition
Implementation
When To Use It
Constraints
Pattern: Central Aggregating Gateway
Ownership
Different Types Of User Interfaces
Multiple Concerns
When To Use It
Pattern: Backend for Frontend (BFF)
How Many BFFs?
Reuse and BFFs
BFFs for Desktop Web and Beyond
When To Use
GraphQL
A Hybrid Approach
Summary
11. Organizational Structures
Conway’s Law
Evidence
Team Size
Understanding Conway’s Law
Small Teams, Large Organization
On Autonomy
Strong vs Collective Ownership
Strong Ownership
Collective Ownership
At A Team vs Organisational Level
Balancing Models
Enabling Teams
Communities Of Practice
The Platform Team
Shared Microservices
Too Hard to Split
Cross-Cutting Changes
Delivery Bottlenecks
Internal Open Source
Role of the Core Committers
Maturity
Tooling
Pluggable, Modular Microservices
Change Reviews
The Orphaned Service
Case Study: RealEstate.com.au
Geographical Distribution
Conway’s Law in Reverse
People
Summary
12. The Evolutionary Architect
Inaccurate Comparisons?
What Is Software Architecture?
Making Change Possible
An Evolutionary Vision for the Architect
Making Change Possible
As A Social Construct
Habitability
A Principled Approach
Strategic Goals
Principles
Practices
Combining Principles and Practices
A Real-World Example
Guiding An Evolutionary Architecture
Governance and Leading from the Center
Architecture In A Stream-Aligned Organization
Building a Team
The Required Standard
Monitoring
Interfaces
Architectural Safety
Governance Through Code
Exemplars
Tailored Microservice Template
The Paved Road
At Scale
Caution Warranted
Technical Debt
Exception Handling
Summary
Mensen die dit boek kochten, kochten ook...
Rubrieken
- Advisering
- Algemeen management
- Coaching en trainen
- Communicatie en media
- Economie
- Financieel management
- Inkoop en logistiek
- Internet en social media
- IT-management / ICT
- Juridisch
- Leiderschap
- Marketing
- Mens en maatschappij
- Non-profit
- Ondernemen
- Organisatiekunde
- Personal finance
- Personeelsmanagement
- Persoonlijke effectiviteit
- Projectmanagement
- Psychologie
- Reclame en verkoop
- Strategisch management
- Verandermanagement
- Werk en loopbaan