Working with binary data in Ruby
summary
Ruby parses a niche OMS meter protocol end to end, replacing fragile string pack/unpack pipelines with a declarative pin data gem that models IP and MAC fields, extracts gzip original filenames, decodes BCD numeric values, and parses a compact 48‑bit timestamp and nested extension-bit lists. The production system runs for over two years at about 2,000 requests per minute, the parser is maintainable and fast enough (parsing cost is negligible versus DB work), and the declarative structures prevent unreadable unpack strings.
AI-written summary · about
chapters (8)
- 0:00Introduction to binary data
- 5:57Bits bytes and endianness
- 10:56Standard library methods
- 17:41Parsing gzip headers
- 23:55Introducing bin_data gem
- 28:49Real-world protocol examples
- 33:16Production experience and recap
- 36:11Q&A and closing
related talks
30mBuilding a binary protocol client in Ruby: A magical journey!
46mBits, Bytes, and Blobs
44mOutside the Web Box: Using Ruby for Other Protocols
34mBuilding Data Driven Products with Ruby
26mData indexing with RGB (Ruby, Graphs and Bitmaps)
05mStreaming data transformations with Ruby
32mSerial Protocol Analyzer on Ruby
42mRuby 124c41+
