Skip to content

Marvin Hsu

I'm Marvin, a backend engineer. Most of what's here I wrote for my future self — the pitfalls I've fallen into, and the ones I haven't yet.

SQL Optimistic Lock in .Net

Once again, I've encountered a concurrency issue recently. The data I attempted to modify didn't yield the desired results. There's evidence showing that more than two applications accessed this data simultaneously. Identifying the application exhibiting conflicting behavior is really difficult. Optimistic locking is a solution for this issue.

Read more →

Large Jsonb Value Performance in Postgres

EFCorePostgres

Recently, our team encountered some performance issues with our APIs. Typically, such issues arise from inefficient querying strategies. However, we stumbled upon a particularly interesting case. This specific API was solely responsible for update operations.In this post, we'll share our experience with this unique case and delve into the JSONB performance during update actions within PostgreSQL.

Read more →

How to Migrate to a Monorepo

GitNXMonorepo

There are many articles that analyze the pros and cons of using a monorepo. However, if you have already decided to migrate from a polyrepo to a monorepo, it can be hard to find tutorials or discussions about the process. I want to share my recent experience and discuss the challenges encountered during the migration. This will provide insights into the steps I took and the considerations made in achieving this goal.

Read more →

Rust Command Line Tool - Just

rusttooljust

A while ago I decided to take on AOC in Rust. Then work got busy and the later puzzles got harder, so I put the whole thing on hold. Recently I shared my solutions on YouTube, and that is where I found a cool little tool called Just. In the demo, Just replaced the long command that you must type every time with something very short.


Read more →

Build a CLI Tool with Clap

At work you often run into tasks that you must repeat again and again. The project schedule rarely leaves room to build a complex interface for them. When a polished user interface is not necessary, a developer usually has to run the task by hand. Tasks like these are a very good fit for a CLI that simplifies the flow. I recently had a need like this, so I wrote a small tool in Rust to work faster.

Read more →

Built with VitePress