Outside the Web Box: Using Ruby for Other Protocols
summary
Claim: Ruby handles non‑HTTP hardware protocols in production. Uses the Ruby socket library to open TCP sockets and TCPServer, offloads work to a Sidekiq worker or Sinatra proxy, parses device streams (different scanner formats), and emits Zebra labels via Zebra CPL strings. Addresses single‑connection devices, private‑network security, flaky cables and parser quirks. Deployed for over a year and the shoe sorter runs in three facilities, so the approach works at scale.
AI-written summary · about
chapters (5)
- 0:00Start
- 5:26How does a web server a handle request?
- 7:14How is TCP different from HTTP?
- 9:58open a socket in order to communicate with hardware, a TCP socket needs to be established
- 22:35middleware shared code to handle different device protocols








