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.tryPromiseandEffect.runPromise, facilitating incremental adoption. - π Resources like Kit Langton's visual explainers and
effectbyexample.comhelp 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