Skip to content

Render Pipeline

Jorge Proaño edited this page May 4, 2022 · 9 revisions

System Design

system

The render pipeline uses several managed services to implement an asynchronous stateful jobs pattern, a variation of Google's long-running-operation API contract.

Some benefits of this approach are:

  • The Caller does not need to wait for the work to be complete.
  • The distributed nature of the system allows for adding resources without downtime.
  • A centralized entry point (API) reduces the need for complex authentication schemas.
  • Workers are language agnostic.
  • Workers can run on the cloud or locally on specialized machines.

Implentation Details

architecture

View diagram on Figma

Cloud Functions

They are trigger by webhooks or cloud scheduller

Webhook Triggers

  • Shopify: order/new

Cloud Scheduller

  • Failed renders: Every 3H
  • Stalled renders: Every $h
  • New orders: Every 12H

Defined in infrastructure repo:

Related libraries

What they do, and where they're defined https://github.com/infiniteobjects/stack/tree/main/libraries

  • stack/libraries/render-worker
  • stack/libraries/render-video*

Clone this wiki locally