Projects
I am listing my projects from the most recent to some of the older ones.
HTTP capture with real-time filtering
At work, I often needed to capture traffic for a specific HTTP handler, such as /v1/create_something
. The typical approach is to use tcpdump
to collect the traffic, download the capture file, and then filter it in Wireshark based on HTTP properties. However, this method produces large capture files filled with unnecessary data, especially when the relevant requests and responses occur infrequently.
To solve this, I developed TUI applications in both Golang and Rust that can "follow the TCP stream" directly. Once the full stream is available (after receiving a TCP FIN), the application parses the request and response, allowing me to filter by request URL or headers.
From my experience, Golang's packet capture libraries are more mature, but cross-compiling applications in both Golang and Rust presents some challenges.
metalmq AMQP 0.9.1
This is my largest Rust project so far. My goal was to learn async Rust programming using real-world requirements, rather than inventing them as I coded. AMQP 0.9.1 is a well-defined but sparsely documented protocol that is widely used, allowing me to compare my implementation with others.
I implemented the wire protocol parsing without relying on serde
, and later decided not to rework it using that library. I started with the server, which provided valuable experience in using CSP concepts in async programming. Deadlocks can be tricky to create and even harder to detect.
During development, I learned about tokio
, the bytes
crate, and other related tools. I completed an in-memory queue implementation, which helped me understand the limitations and ambiguities of certain protocol features, such as immediate publishing to multiple queues without all being consumed. At that point, I considered the project finished, even though software projects are never truly complete.
ejson Erlang JSON serializer library
In the Java world, countless tools make programmers' lives easier when they want to store data in some external format (database, binary file, web). There are a huge number of annotation-based JSON converters.
In Erlang, things are a bit different; it's more of a do-it-yourself world, where everyone customizes a low-level JSON converter for their own convenience. I came up with a declarative framework for this, where you can define rules and ejson automatically converts Erlang data to JSON format. And what used to be even more painful in the past, it automatically converts from JSON to Erlang terms—with error checking.
I stated this project in 2013 and it is retired since the problem is solved by the larger community. Since that project was running for long time I learnt a lot about maintaining open source libraries.