Master API design, event-driven structures, and package management in Python
Jaime Buelta
2022
-
Preface
Chapter 1: Introduction to Software Architecture
-
Part I: Design
- Chapter 2: API Design
- Abstractions
- Using the right abstractions
- Leaking abstractions
- Resources and action abstractions
- RESTful interfaces
- A more practical definition
- Headers and statuses
- Designing resources
- Resources and parameters
- Pagination
- Designing a RESTful API process
- Using the Open API specification
- Authentication
- Authenticating HTML interfaces
- Authenticating RESTful interfaces
- Self-encoded tokens
- Versioning the API
- Why versioning?
- Internal versus external versioning
- Semantic versioning
- Simple versioning
- Frontend and backend
- Model View Controller structure
- HTML interfaces
- Traditional HTML interfaces
- Dynamic pages
- Single-page apps
- Hybrid approach
- Designing the API for the example
- Endpoints
- Review of the design and implementation
- Summary 73
- Chapter 3: Data Modeling
- Types of databases
- Relational databases
- Non-relational databases
- Key-value stores
- Document stores
- Wide-column databases
- Graph databases
- Small databases
- Database transactions
- Distributed relational databases
- Primary/replica
- Sharding
- Pure sharding
- Mixed sharding
- Table sharding
- Advantages and disadvantages of sharding
- Schema design
- Schema normalization
- Denormalization
- Data indexing
- Summary
- Chapter 4: The Data Layer
- The Model layer
- Domain-Driven Design
- Using ORM
- Independence from the database
- Independence from SQL and the Repository pattern
- No problems related to composing SQL
- The Unit of Work pattern and encapsulating the data
- CQRS, using different models for read and write
- Database migrations
- Backward compatibility
- Relational schema changes
- Changing the database without interruption
- Data migrations
- Changes without enforcing a schema
- Dealing with legacy databases
- Detecting a schema from a database
- Syncing the existing schema to the ORM definition
- Summary
-
Part II: Architectural Patterns
- Chapter 5: The Twelve-Factor App Methodology
- Intro to the Twelve-Factor App
- Continuous Integration
- Scalability
- Configuration
- The Twelve Factors
- Build once, run multiple times
- Dependencies and configurations
- Scalability
- Monitoring and admin
- Containerized Twelve-Factor Apps
- Summary
- Chapter 6: Web Server Structures
- Request-response
- Web architecture
- Web servers
- Serving static content externally
- Reverse proxy
- Logging
- Advanced usages
- uWSGI
- The WSGI application
- Interacting with the web server
- Processes
- Process lifecycle
- Python worker
- Django MVT architecture
- Routing a request towards a View
- The View
- HttpRequest
- HttpResponse
- Middleware
- Django REST framework
- Models
- URL routing
- Views
- Serializer
- External layers
- Summary
- Chapter 7: Event-Driven Structures
- Chapter 8: Advanced Event-Driven Structures
- Chapter 9: Microservices vs Monolith
-
Part III: Implementation
-
Part IV: Ongoing operations
-
Other Books You May Enjoy
-
Index