Tech Musings
Author

Tech Musings

Capturing thoughts and reflections while coding.

49
Articles
0
Likes
46
Views
0
Comments
Recent Articles

Latest from Tech Musings

49 recent articles
Tech Musings
Tech Musings
Nov 27, 2025 · Backend Development

Can Go’s GreenTeaGC Beat the Standard GC? Benchmark Results Revealed

A comprehensive benchmark compares Go's experimental GreenTeaGC (enabled via GOEXPERIMENT=greenteagc) against the standard GC using 30,000 and 50,000 long‑lived TCP connections, measuring GC pauses, heap usage, CPU load and scalability, and finds no decisive performance advantage.

GoGreenTeaGCPerformance Benchmark
0 likes · 17 min read
Can Go’s GreenTeaGC Beat the Standard GC? Benchmark Results Revealed
Tech Musings
Tech Musings
Nov 4, 2025 · Backend Development

Simplifying a Four‑Layer TCP Proxy in Go: From Custom Goroutine Loops to io.Copy

The article recounts the original complex implementation of a four‑layer TCP proxy in Easegress, explains why using separate read/write goroutines and custom buffers caused error‑handling and flow‑control difficulties, and then shows how switching to Go's io.Copy (and its variants) dramatically simplifies the code while preserving performance through zero‑copy techniques.

GoTCPio.Copy
0 likes · 17 min read
Simplifying a Four‑Layer TCP Proxy in Go: From Custom Goroutine Loops to io.Copy
Tech Musings
Tech Musings
Dec 4, 2021 · Backend Development

How Byte Buddy Powers Java Agents: Classloader Tricks and Dependency Solutions

This article explores using Byte Buddy to build Java agents, detailing the premain method, class loading mechanisms, handling dependency conflicts with Maven shade versus custom classloaders, and implementing a Dispatcher to bridge agent and application classloaders, providing practical code snippets and diagrams for each step.

Byte BuddyInstrumentationclassloader
0 likes · 9 min read
How Byte Buddy Powers Java Agents: Classloader Tricks and Dependency Solutions
Tech Musings
Tech Musings
Sep 21, 2021 · Backend Development

Migrating a Java Spring Microservice to Kotlin: Practical Steps and Pitfalls

This article shares a developer’s experience converting a Java Spring Boot microservice to Kotlin, covering why Kotlin is attractive, required Maven plugins and dependencies, code‑migration quirks such as open classes and @Jvm annotations, testing hurdles, and the final decision to revert to Java.

KotlinSpring Bootcode migration
0 likes · 11 min read
Migrating a Java Spring Microservice to Kotlin: Practical Steps and Pitfalls
Tech Musings
Tech Musings
Jul 11, 2021 · Fundamentals

Why Distributed Consistency Algorithms Matter and How Raft Achieves Consensus

This article explains why distributed systems need consistency algorithms, compares weak and strong consistency, outlines the challenges of unreliable networks and clocks, and provides a detailed walkthrough of the Raft consensus protocol, its node states, state variables, RPCs, and a practical lab implementation for leader election.

Consensus AlgorithmRaftState Machine Replication
0 likes · 12 min read
Why Distributed Consistency Algorithms Matter and How Raft Achieves Consensus
Tech Musings
Tech Musings
Jul 8, 2021 · Big Data

Building a Simple Single-Node MapReduce System: From Theory to Code

This article walks through implementing a lightweight single‑machine MapReduce framework inspired by the original MapReduce paper, covering the abstract Map/Reduce model, task scheduling between master and workers, core Go code for map, reduce, worker, and coordinator, and a brief reflection on its limitations.

LabMapReduceParallel Computing
0 likes · 10 min read
Building a Simple Single-Node MapReduce System: From Theory to Code
Tech Musings
Tech Musings
May 14, 2021 · Databases

How to Diagnose and Fix MySQL Deadlocks Using Locks and Indexes

This article explains why MySQL deadlocks occur in a test module, details table and row lock mechanisms, reproduces the deadlock scenario with two sessions, analyzes lock logs, and provides a solution by adding a composite index to prevent the conflict.

DeadlockIndexInnoDB
0 likes · 19 min read
How to Diagnose and Fix MySQL Deadlocks Using Locks and Indexes
Tech Musings
Tech Musings
May 18, 2020 · Fundamentals

Master Multi‑Round Interview Coding: Parsing, Concurrency, and Matrix Multiplication

This article walks through three typical interview coding rounds—implementing a robust string‑to‑int parser, designing a high‑concurrency trace‑storage API, and building a matrix multiplication routine with performance and sparse‑matrix optimizations—providing code examples, corner‑case handling, and improvement ideas.

Algorithm OptimizationString Parsingcoding interview
0 likes · 7 min read
Master Multi‑Round Interview Coding: Parsing, Concurrency, and Matrix Multiplication