Drupal 8 with Cache and Bigpipe

anup.singh
pramod_patil
tusharbodke

BigPipe is a fundamental redesign of the dynamic web page serving system. The general idea is to decompose web pages into small chunks called pagelets, and pipeline them through several execution stages inside web servers and browsers. This is similar to the pipelining performed by most modern microprocessors: multiple instructions are pipelined through different execution units of the processor to achieve the best performance. Although BigPipe is a fundamental redesign of the existing web serving process, it does not require changing existing web browsers or servers; it is implemented entirely in PHP and JavaScript. It is worth mentioning here that Bigpipe concept has been ideated by Facebook in 2009.

All asynchronous functions are executed after the initial layout is flushed to the client so the client will see a barebone layout immediately. Each asynchronous function, also called a pagelet, is rendered and pushed independently to the client. Each pagelet is generally self-contained, meaning it has its own HTML, JS, CSS.

The major downside to BigPipe is that it requires Javascript on the client and HTTP caching is pretty much impossible. BigPipe should be used only for dynamic content.

Currently, Drupal 8 is the only CMS with BigPipe deeply integrated across the board for both core and contributed modules—they merely have to provide some cacheability metadata and need no awareness of the technical minutiae. Drupal 8's Dynamic Page Cache module ensures that the page skeleton is already cached and can thus be sent immediately.

 

What we'll discuss:

  1. How BigPipe works

  2. Decoupled Drupal

  3. A "Facebook BigPipe" render pipeline

  4. Traditional webpage serving model

  5. Pipeline-based Bigpipe Webpage Serving Model

  6. Difference in traditional and Bigpipe request

  7. In depth demo on Bigpipe in Drupal

Session Track

Coding and Development

Experience Level

Intermediate

Drupal Version