Outside the (Web) Box: Using Ruby for Other Protocols
summary
Shows Rails apps opening real TCP sockets via Ruby's stdlib (TCPSocket/TCPSERVER) to talk to barcode scanners, Zebra printers speaking ZPL label language and a shoe sorter, with a background job queue kicking off printer jobs and a separate daemon listener for scans. Covers keeping sockets private, one-connection device coordination, failure modes and manual testing. The system runs in production across multiple warehouses and handles printing and scan-to-database updates reliably.
AI-written summary · about
chapters (7)
- 0:00Start
- 4:29What is an HTTP request? How does Rails handle requests?
- 8:47open a socket in order to communicate with hardware, a TCP socket needs to be established
- 11:01machines there are lots of types of servers and clients
- 20:01device protocols not all devices support the same protocol
- 22:04middleware shared code to handle different device protocols
- 28:20Testing Integration with hardware becomes difficult to mock and requires lots of manual testing.
related talks
35m"How to hijack, proxy and smuggle sockets with Rack/Ruby"
28mReal-Time Rails
34mIndustrial Rails
34mUnraveling the Cable: How ActionCable works
36mUsing Ruby In Security Critical Applications
38mHigh Concurrent Ruby Web Development Without Fear
40mRunning a Government Department on Ruby for over 13 Years
37m"How to Hijack, Proxy and Smuggle Sockets with Rack/Ruby"
