Beyond REST maturity levels:



Real life, high-load REST APIs


ConFoo, Montreal, Canada - February 24th, 2023

© David Buchmann







David Buchmann - david@liip.ch

PHP Engineer, Liip SA, Switzerland

Richardson REST maturity model

  1. Remote function calls over HTTP
  2. Resources
  3. HTTP verbs
  4. Hypermedia Controls

REST maturity levels is a good way to think conceptually about APIs


As promised, this talk is not about the REST maturity concept, but about tools for building APIs

You've got a "situation"

Delivering Data

API: Symfony Application

API: Versioning

/**
 * The description as HTML
 *
 * @Serializer\Since("2")
 */
public string $description;
Api-Version: 2
        
/**
 * Plain text version of description.
 *
 * @Serializer\Until("1")
 * @Serializer\VirtualProperty
 * @Serializer\SerializedName("description")
 */
public function getDescPlaintext(): string
{
    return strip_tags($this->description);
}

Varnish Cache

Varnish Cache: Prerequisites

Varnish Cache: Access Control

Varnish Cache: Routing

Varnish Cache: To BAN or not to BAN

Varnish Cache: Increase Cache Hits

Get people to use your API

Documentation

Zircote Swagger-PHP

class ProductController {
  #[OA\Get(
    path: "/procut/{id}",
    tags: ["Products"]
  )]
  #[OA\Response(
    response:"200", new OA\JsonContent(
      new OA\Schema(
        ref:"#/components/schemas/Product"
      )
  )]
 public function getAction($id)

Indexing Architecture

Workflow

Architecture

Indexer

Symfony Workers and Commands

Data Quality

Monitoring and Diagnostics

Elasticsearch

Elasticsearch: Indexes

Elasticsearch: Schema Changes

Elasticsearch: Clustering

Outlook

Beyond REST


Alternatives: Stateless, but...



Thank you!


@dbu

David Buchmann, Liip SA