Parsing the Redis Serialization Protocol (RESP) in Rust with nom (Part 3)

Subscribers:
950
Published on ● Video Link: https://www.youtube.com/watch?v=YPTCdG0NtoQ



Duration: 1:17:44
179 views
6


In this live coding session, we continue our project focused on parsing the Redis protocol in Rust using the nom library. We tackle various data types within the protocol, including bignumber, bulk error, verbatim string, and more complex structures like maps and sets and pushes.

We also did some refactoring along the way to avoid some unnecessary code duplication and we improved our test suite.

This concludes the basic implementation of parsing the Redis protocol. The library might still require some tweaking but that might be the topic of another video!


Chapters:


00:00:00 Intro
00:00:30 Implementing the Bignumber parser
00:16:30 Implementing the Bulk Error parser
00:18:59 Refactoring the parsing of Null values
00:30:51 Implementing the Verbatim String parser
00:39:37 Implementing the Map parser
01:02:39 Implementing the Set parser
01:09:22 Implementing the Pushes parser
01:12:40 Refactoring the parsing of sequences of values
01:17:34 Closing


⛓️ Links:

- Our previous session in the series: https://www.youtube.com/watch?v=ZPdZBHKO4PM
- Our repo (tinyresp): https://github.com/lmammino/tinyresp
- nom documentation: https://docs.rs/nom
- nom combinators cheatsheet: https://github.com/rust-bakery/nom/blob/main/doc/choosing_a_combinator.md
- nom error management cheatsheet: https://github.com/rust-bakery/nom/blob/main/doc/error_management.md
- nom official examples: https://github.com/rust-bakery/nom/tree/main/examples
- examples from this presentation: https://play.rust-lang.org/?
version=stable&mode=debug&edition=2021&gist=f2db795f7b887f9a2257f950863ee1f5
- The Redis Serialization Protocol (RESP) Spec: https://redis.io/docs/reference/protocol-spec/


➡️ Follow us on Twitch for more live streams at https://twitch.tv/loige

#Rust #Parsing #NOM #RedisProtocol #LiveStream #Twitch #LiveCoding




Other Videos By Luciano Mammino (loige)


2024-08-26Building Tinykit: a simple lead generation app on AWS Serverless with Rust - Part 7
2024-08-14Building Tinykit: a simple lead generation app on AWS Serverless with Rust - Part 6
2024-07-29Building Tinykit: a simple lead generation app on AWS Serverless with Rust - Part 5
2024-06-11Building Tinykit: a simple lead generation app on AWS Serverless with Rust - Part 4
2024-06-04Building Tinykit: a simple lead generation app on AWS Serverless with Rust - Part 3
2024-05-27Building Tinykit: a simple lead generation app on AWS Serverless with Rust - Part 2
2024-04-15Building Tinykit: a simple lead generation app on AWS Serverless with Rust - Part 1
2024-04-09Building Lambda functions in Rust - part 3
2024-03-19Building Lambda functions in Rust - part 2
2024-03-12Building Lambda functions in Rust
2024-02-27Parsing the Redis Serialization Protocol (RESP) in Rust with nom (Part 3)
2024-02-20Parsing the Redis Serialization Protocol (RESP) in Rust with nom (Part 2)
2024-02-05Exploring OramaSearch with Michele Riva - Indexing and searching blog posts
2024-01-30Intro to nom, a parser combinator library for Rust
2024-01-15Automating blog post descriptions and SEO metadata with Amazon Bedrock
2023-12-11Solving Advent Of Code 2023 day 11
2023-12-04Solving Advent Of Code 2023 day 1 to 3
2023-11-13Building a Twitch Chat Game in Rust part 5 - Twitch Live Stream
2023-11-06Building a Twitch Chat Game in Rust part 4 - Twitch Live Stream
2023-09-18Building a Twitch Chat Game in Rust part 3 - Twitch Live Stream
2023-09-11Building a Twitch Chat Game in Rust part 2 - Twitch Live Stream



Tags:
rust
redis
nom
parsing
protocol
live coding
slides
parser combinator
regex
regular expression
string splitting
introduction
tech talk
twitch
live stream
pair programming
pairing
english
italian
twitch live coding
Rust
Redis Protocol
nom Library
Parsing Data Types
Data Structures
Protocol Implementation
Efficiency Optimization
Error Handling
Collaborative Learning
GitHub
Live Coding Session
Software Development
Rust Programming Language