Tech.
45 posts — Posts about Tech
Notes from Building an IntelliJ IDEA Plugin
Notes from building my own MyBatis SQL log parsing plugin: why I built it, how parameter filling works under the hood, the learning curve of IDEA plugin development, and some takeaways from publishing to the plugin marketplace.
Reflections on My First Few Years in Tech
Before I knew it, I had spent several years in the internet industry. Back when I first started learning to code, I was writing demo projects every day — from the simplest Hello World to little games, crawlers, and admin systems — and every new skill brought a real sense of achievement.
Distributed Locks and Spring Transaction Ordering: A Subtle Concurrency Bug
A reader used a ZooKeeper distributed lock for ticket-sale deductions, yet the counts still went wrong under high concurrency. The root cause: the lock was released before the transaction committed, letting the next thread read stale data. Here is the reasoning and the fix.
How I Think About Java Backend Architecture
Organizing my understanding of Java backend architecture: from coding standards, module decomposition, middleware, and database governance to security, team collaboration, and the evolution toward microservices.
Building a Remote Desktop in Java
An experiment in implementing remote desktop with Java: notes on Robot screen-capture performance, the bandwidth cost of shipping images, and the trade-offs between h.264 video streaming and run-length-encoded delta transmission.
Exporting Hundreds of Millions of MySQL Rows to Excel
A production design for exporting massive list data from a SaaS system to Excel: MQ-based load leveling with async consumers, read replicas to absorb query pressure, id-cursor pagination with EasyExcel spilling to disk and uploading to OSS — 75.5 million rows exported in about 20 minutes.
Paginating Hundreds of Millions of Rows in MySQL
Once a table grows to millions of rows, plain limit-based pagination gets slower with every page. Notes from optimizing pagination on a billing table: locating primary keys with a subquery, deferred joins, and verifying with explain to bring deep pagination down to acceptable latency.
Some Thoughts on Logo Design
From brand positioning and color choices to shape, form, and trademark registration — what it takes to carry a logo from design to launch. A logo isn't just a pretty graphic; it's the vessel of brand memory.
Notes on Adopting ELK
Our stats workload pushed the MySQL cluster to its limit, and index tuning couldn't save it. So we brought in ELK: Logstash for incremental sync, Elasticsearch for aggregations, Kibana for visualization. Here's the reasoning and the incremental sync design.
Migrating to Alibaba Cloud
Taking advantage of the Singles' Day sale to move my blog from a Hong Kong server to Alibaba Cloud: a full Docker migration, domain ICP filing, and automated Let's Encrypt renewal with certbot—the process and the pitfalls.