Caching with the Postgres WAL
Chase has successfully bootstrapped and sold two software companies.
Logflare, his latest, is a general-purpose log analytics service written in Elixir.
Logflare was recently purchased by Supabase and now powers PostgreSQL logs and analytics for thousands of Supabase customers. Chase is bringing observability to the Supabase stack powered by Elixir services.
There are only two hard things in Computer Science: cache invalidation and naming things.
– Phil Karlton
In this talk we’ll learn how to use the Postgres write ahead log to invalidate a cache across an Erlang cluster.
With Elixir and the beam we can easily cache data with ETS and use a stateful connection to subscribe to Postgres database changes. With these tools at hand we cache data and know exactly when to expire that cache.