Beyond REST maturity levels:



Real life, high-load REST APIs


PHP Benelux, Antwerp - January 27th, 2018

© David Buchmann

You've got a "situation"

Delivering Data

API: Symfony Application

API: Versioning

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

Varnish Cache

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

NelmioApiDocBundle

class LabelController {
   /**
    * @Route("/label/{id}", methods={"GET"})
    * @SWG\Response(
    *  description="Returns a single label",
    *  @SWG\Schema(
    *   @Model(type=Label::class, groups={"api"})
    *  )
    * )
    * @SWG\Tag(name="Products")
    */
   public function getAction($id)

Indexing Architecture

Workflow

Architecture

Symfony 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

https://joind.in/