← Graph

When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails

talk 20 connections

Emiliano Della Casa's wroclove.rb 2026 talk. Opens with why REST is a de facto standard (simple, accessible, Rails-default) and when it isn't enough — arguing that modern apps, especially with the AI revolution, do more than CRUD and that REST is a hammer that doesn't fit every nail. Walks through four alternatives with small Rails demos against the same toy e-commerce order creation service: (1) gRPC — Google, 2015, built on HTTP/2 and Protocol Buffers; high performance, streaming, strong typing, security by design; harder to integrate because client and server must agree on a protofile, and harder to debug because payloads are binary. Demo uses a protofile defining OrderService.CreateOrder with a generated Ruby class and grpcurl as client on port 50051. (2) GraphQL — Facebook, 2015; declarative data fetching/modification; single endpoint; solves REST over-fetching and under-fetching; demoed with the graphql-ruby gem exposing a createOrder mutation called via curl. (3) MQTT — IoT-focused pub/sub protocol with a broker; three quality-of-service levels (0 fire-and-forget, 1 at-least-once, 2 exactly-once); supports bidirectional communication; demoed with the ruby mqtt gem subscribing to an 'orders' topic with Mosquitto as broker and mosquitto_pub as client. Publisher gets no response (fire-and-forget), so error cases require a separate 'order_failed' topic. (4) MCP — Anthropic, 2024; JSON-RPC based; designed for LLMs, token-efficient for them but slower; demoed using the fast-mcp gem exposing a create_order tool consumed by Claude Code. When given a bad product ID, Claude reads the Active Record stack trace and proactively suggests checking the product ID. Concluding recommendations: gRPC for high-performance internal service-to-service, GraphQL for flexible client-driven queries, MQTT for IoT and bidirectional scenarios, MCP for LLM integration. Q&A covers Twirp as a simpler gRPC-style alternative from Twitch, how MQTT compares with WebSockets, and Ryan Townsend's suggestion to use HTTP shared dictionary compression to get JSON payloads close to Protobuf size without a protofile contract.

date
2026-04-17
type
talk
talk When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails
about
REST concept
Talk frames alternatives in contrast to REST as the default.
talk When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails
about
gRPC tool
First alternative protocol covered, with a Rails demo.
talk When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails
about
GraphQL tool
Second alternative protocol covered, demoed via graphql-ruby.
talk When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails
about
MQTT tool
Third alternative protocol covered, demoed via ruby-mqtt and Mosquitto.
talk When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails
about
Fourth alternative protocol covered, demoed via fast-mcp and Claude Code.
talk When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails
about
grpcurl tool
Used in the gRPC demo to call the CreateOrder RPC.
talk When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails
about
Used in the GraphQL demo to expose a createOrder mutation.
talk When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails
about
ruby-mqtt tool
Used in the MQTT demo to subscribe to the orders topic.
talk When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails
about
Mosquitto tool
Used as the MQTT broker in the demo, with mosquitto_pub as CLI publisher.
talk When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails
about
fast-mcp tool
Used in the MCP demo to expose a create_order tool.
talk When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails
about
Used as the MCP client interpreting natural-language order creation.
asked_at
When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails talk
Audience question during the talk's Q&A.
asked_at
When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails talk
Audience question during the talk's Q&A.
asked_at
When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails talk
Ryan Townsend raised this point during the Q&A.
authored
When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails talk
Emiliano gave this talk at wroclove.rb 2026.
from_talk
When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails talk
Concluding recommendation of the talk.
from_talk
When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails talk
Concluding recommendation of the talk.
from_talk
When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails talk
Concluding recommendation of the talk.
from_talk
When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails talk
Concluding recommendation of the talk.
talk When REST is Not Enough: Implementing Alternative Protocols in Ruby on Rails
presented_at
Presented on day 1 of wroclove.rb 2026.

Provenance

Created
2026-04-17 16:18 seed
Read by
39 extractions