RESTful API Patterns & Practices • Mike Amundsen • GOTO 2024

Learn essential RESTful API patterns and practices from Mike Amundsen, covering workflow support, service patterns, data modeling, and designing resilient systems at scale.

Key takeaways
  • Pattern thinking helps create reusable, composable software solutions by identifying recurring problems and their core solutions

  • Data should be viewed as evidence of business capabilities rather than the primary focus - actions and workflows are what matter

  • Client applications are more important than services - services enable clients to do work, but clients make the actual decisions

  • APIs need to be forward-compatible and handle changes over time through:

    • Versioning
    • Extensible data models
    • Hiding implementation details
    • Supporting multiple formats
  • Messages should focus on:

    • Actions/capabilities vs raw data
    • Common vocabularies and semantics
    • Metadata for queries and responses
    • Identifiers for all elements
    • Supporting multiple formats (JSON, XML, etc)
  • Key service patterns include:

    • Service discovery and health monitoring
    • Consistent error handling
    • Caching and optimization
    • Stateful workflow support
    • Idempotent operations
  • Workflow needs to support:

    • Step-by-step processes
    • Rollbacks and reversibility
    • Client state management
    • Service orchestration
    • Error recovery
  • Systems should be designed for:

    • Uncorrelated parties to interact
    • Unknown future use cases
    • Changes in underlying technology
    • Long-term evolution
    • Global scale
  • The data model is not:

    • The object model
    • The resource model
    • The representation model
  • Focus on making designs:

    • Composable
    • Extensible
    • Modifiable
    • Reversible
    • Resilient