View Posts for Software Engineering

  • Taking Turns with TurnKeeper: An Async Job Scheduler in Async Rust

    |
    Updated at

    Ever needed to run a task repeatedly in your Rust application? Maybe it's sending out daily reports, cleaning up old data weekly using a CRON schedule, or checking an external service every few minutes? You might reach for a job scheduler. While building a recent project, I found myself needing exactly this, but the existing Rust landscape didn't quite fit the bill for the specific blend of features I wanted. So, naturally, I decided to build my own: TurnKeeper.

    This wasn't just about reinventing the wheel (...

  • Wrangling MySQL Schemas: Building a Stateless Migration Tool in Rust

    |
    Updated at

    Like many developers, I've spent my fair share of time dealing with database schema changes across different environments. Keeping development, staging, and production in sync can feel like herding cats. Traditional migration tools often use tracking tables to remember what's been run, which works great, but I found myself wanting something a bit different for certain workflows.

    A while back, I built a small Node.js tool called agogo based on a specific idea: what if the tool didn't track state? What if, ins...

  • Taking Aim at Template Rot: Building Spawn Point, Solving the Maintenance Problem

    |
    Updated at

    You've been there. Need a new microservice, maybe a quick CLI tool. You remember that perfect template you stashed away, or maybe you grab one off GitHub. git clone, run the generator... npm install... FAILED. Or cargo build... FAILED. Dependencies drifted, build steps changed, the world moved on. The template lied. Template rot is real, and it wastes our time debugging boilerplate before we even write line one of our actual project.

    I got seriously fed up with this cycle. I've automated the heck out of th...

  • Tidy Up and Ship Out, Open Source Your Internal Projects Safely. Introducing oss-porter!

    |
    Updated at

    You've got this awesome project you built internally. It started small, maybe lived in a giant monorepo, or perhaps its own repo that also accumulated some... internal peculiarities. Now, the time has come: you want to share it with the world! Open source it! 🎉

    That initial excitement often hits a speed bump: how do you actually get just that project out without exposing the entire monorepo, confidential history, accidental secrets, or internal configurations? And maybe even trickier: once it's out, how do ...

  • Taming the Beast with RockSolid: Simplifying RocksDB with My New Rust Crate!

    |
    Updated at

    It's about time that I did this, all these years of cobbling together and duplicating this code and now I've formalized it into a crate!

    So, if you've been following my coding adventures, you know I'm a big fan of Rust. And like many developers, I often find myself needing a fast, reliable local database. Enter RocksDB – it's powerful, battle-tested (used by giants like Meta!), and integrates nicely with Rust thanks to the rocksdb crate.

    But... here's the thing. While RocksDB is great, using it directly ofte...

  • Taming Mixed Lists: Introducing natlex_sort for Hybrid Rust Sorting

    |
    Updated at

    Precursor Post
    Ever found yourself trying to sort a list of strings in Rust, only to realize that no single standard sorting method does exactly what you need? Maybe you have a mix of fixed-length identifiers like ULIDs alongside human-readable filenames with numbers?

    // Desired Sort Order?
    [
      "id-00000000000000000000000001", // Fixed length, zero-padded
      "id-00000000000000000000000002",
      "report_2.csv",                 // Variable length, numbers
      "report_10.csv"
    ]
    

    Standard lexicographical sort (slice...

  • Building Bulwark: An In-Memory Indexing Adventure

    |
    Updated at

    Sometimes, you just need things to be fast. Like, really fast. That was the core idea simmering in my head that eventually led to "Bulwark," an internal project I've been pouring time into lately. Inspired by CQEngine (a fantastic Java library tackling similar problems), I wanted something similar but built with Rust's strengths in performance and safety.

    We often rely on databases – powerful, persistent, feature-rich workhorses. But what happens when your dataset comfortably fits in your server's RAM, and ...

  • Shaving Milliseconds from RPCs: xSMB, My High Performance Internal Messaging Backbone

    |
    Updated at

    In the world of microservices and distributed systems, how our internal components talk to each other is a huge factor in overall performance. We often rely on standards like REST over HTTP or tools like gRPC. These are fantastic for many things, especially external APIs and broad interoperability. But what happens when you're deep inside your own infrastructure, connecting services you control, and every bit of latency or overhead feels like friction you wish wasn't there?

    This is a common challenge, and i...

  • I Built A Distributed Real-Time Monitoring and Alerting Platform in 2017

    |
    Updated at

    I used to work on Datacenter Monitoring circa 2015. I automated the heck out of my job. One of the last projects I delivered there was a Distributed Real Time Monitoring and Alerting Platform, written in Java. I will build it once again with the help of AI in Rust.

    It was an incredibly complex system with 5 different roles, technically 4 layers. I spent around 6 months building the system and was incredibly proud of it. It worked like a charm, very fast, high performance, exceeded my wildest dreams, when ...

  • Rust Crates, Error Handling: Thiserror vs Anyhow

    |
    Updated at

    I wondered what's the difference and when to use them


    Thiserror and Anyhow are both extremely popular and useful error handling crates in Rust, but they serve fundamentally different purposes, primarily based on whether you are writing a library or an application (binary).

    Breaking it Down

    thiserror - For Defining Specific Error Types (Libraries)

    1. Purpose: To easily create custom, specific error types (usually enums) for your library. It helps you define what errors your library can produce.
    2. Mechanism: Uses ...