AI summary by TwinMind
tRPC: It’s Nothing Like gRPC
Theo - t3․gg
6m 15s
Core Differences Between gRPC and tRPC
- gRPC and tRPC have nothing to do with each other - completely different use cases
- gRPC: Protobuf solution for inter-server communications
- Enables one server to communicate with another server
- Built for very fast inter-server comms
- tRPC: TypeScript RPC (Remote Procedure Call)
- Designed for server-client interoperability
- Shares data and type definitions between client and server
- Makes client-server relationship simple (similar to GraphQL)
Architecture Layer Communication Analysis
- Four-layer system breakdown:
- Databases (SQL DB, Redis)
- Microservices
- Gateway/API layer
- Clients (TypeScript web client, mobile app, analytics service)
Database to Microservices Communication
- Best practices: SQL for database queries
- JSON for some data transfer
- Standard database communication protocols
Inter-Service and Service-to-Gateway Communication
- Optimal solutions: gRPC or HTTP JSON
- gRPC specifically built for inter-service communications
- HTTP good alternative option
- Do NOT use tRPC here - common mistake
Client-to-Gateway Communication
- Multiple viable options:
- HTTP JSON (default)
- GraphQL
- tRPC
- These three solutions specifically built for client-gateway communication
Technology Misuse Warnings
- Common mistakes people make:
- Using GraphQL for database-level communications (wrong layer)
- Using gRPC for web client communications ("gRPC for web is a joke")
- Not understanding specific use cases for each technology
- Technologies should be used for their intended purpose
- Car vs boat analogy: different tools for different environments
Channel Promotion
- Over half of viewers haven't subscribed
- Content live-streamed on Twitch (twitch.tv/theo)
- Live schedule: Wednesdays 2-3 PM, Fridays frequently
- YouTube content consists of clips from Twitch streams
