When REST is Not Enough
summary
Compares concrete alternatives to REST and when they actually pay off: gRPC (HTTP/2 + protobuf) gives orders-of-magnitude faster RPC with streaming but forces a rigid proto contract and harder client updates — used in production for fleet tracking at ~10,000 vehicles on a 5051 gRPC port. GraphQL single endpoint solves over/ and underfetching for flexible queries via mutations like createOrder. MQTT with Mosquitto broker offers pub/sub, QoS 0/1/2 and fast fire‑and‑forget messaging but no immediate ack unless you add reply topics. MCP (JSON‑RPC for LLMs) is token‑efficient for model integrations but shows higher latency.
AI-written summary · about
chapters (17)
- 0:00Introduction and welcome
- 1:29Why REST is the default
- 2:35Limitations of REST
- 3:40Introduction to gRPC
- 6:12gRPC in Rails demo
- 8:43gRPC vs REST comparison
- 10:14Introduction to GraphQL
- 11:43GraphQL in Rails demo
- 12:46GraphQL error handling
- 13:09Introduction to MQTT
- 15:21MQTT in Rails demo
- 16:44MQTT bidirectional limits
- 18:05Introduction to MCP
- 19:35MCP in Rails demo
- 21:19LLM integration with MCP
- 22:43When to use each protocol
- 23:54Q&A session
