Skip to main content

Dillon Mulroy on Effect: Scaling TypeScript Applications at Vercel

[HPP] SwyxOctober 27, 20251h 21min
32 connections·31 entities in this video→

Effect: A Robust TypeScript Library

  • πŸ’‘ Effect is presented as TypeScript's missing standard library, aiming to provide a more robust and scalable way to build applications.
  • 🎯 It is considered a spiritual successor to FP-TS, drawing from functional programming roots but also incorporating object-oriented patterns.
  • πŸ”‘ The library focuses on explicit error handling, dependency injection, and structured concurrency.

Vercel's Experience and Scalability

  • πŸš€ Dillon Mulroy's team at Vercel successfully used Effect to rewrite core registrar services, an eight-year-old product spanning multiple microservices.
  • βœ… This rewrite significantly improved DevX (Developer Experience) and observability within Vercel.
  • πŸ“ˆ Effect addresses common TypeScript scaling problems in large organizations, such as inconsistent error handling, observability, and sharing abstractions.

Core Features and Design Principles

  • 🧠 At its essence, an Effect is a lazy description of a program with three generic parameters: success value, error type, and requirements (dependencies).
  • ⚠️ It enforces treating errors as values, forcing developers to consider error paths and enabling composable error handling with retries.
  • 🧩 Dependency injection is managed through "layers" (or "services" in Effect 4.0), which provide concrete implementations for required services at runtime.
  • ⚑ Structured concurrency is achieved through fibers, offering fine-grained control over parallel operations, similar to Go routines or React's concurrency model.

Learning and Adoption

  • πŸ“‰ The perceived learning curve for Effect is initially steep but flattens quickly, with a few core patterns unlocking significant productivity.
  • 🀝 Interoperability with promise-based code is straightforward using Effect.tryPromise and Effect.runPromise, facilitating incremental adoption.
  • πŸ“š Resources like Kit Langton's visual explainers and effectbyexample.com help demystify core concepts.

Advanced Capabilities and Future

  • πŸ“Š OpenTelemetry integration for tracing and spans is seamless, automatically wrapping operations for comprehensive observability.
  • πŸ› οΈ The Effect Platform provides cross-runtime compatibility (browser, Node, Bun, Deno) through standardized interfaces.
  • 🌱 Effect 4.0 promises slimmed-down APIs, improved schema (encoding/decoding), and aims for mainstream adoption, positioning Effect as a foundational tool for reliable software development.
Knowledge graph31 entities Β· 32 connections

How they connect

An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.

Hover Β· drag to explore
31 entities
Chapters3 moments

Key Moments

Transcript299 segments

Full Transcript

Topics15 themes

What’s Discussed

Effect (TypeScript library)TypeScript ScalabilityError HandlingDependency InjectionStructured ConcurrencyFibersVercel DomainsEffect AtomEffect RPCOpenTelemetryTracingEffect SchemaWorkflow VersioningLazy EvaluationIncremental Adoption
Smart Objects31 Β· 32 links
PeopleΒ· 3
ConceptsΒ· 22
ProductsΒ· 4
CompaniesΒ· 2