Skip to main content

My Self-Hosted NAS Build Experience

· 6 min read
Ivan Tsai
Backend engineer

Introduction

My Synology DS218+ had been repeatedly showing disk power-off errors. I suspected the SATA backplane, and that became a good excuse to retire my 8-year-old NAS and build a small server to use as both a NAS and a homelab machine. In this post, I share my self-built NAS journey, including hardware choices and software setup.

Debate of AI Agents: Cloudflare vs. Perplexity

· 4 min read
Ivan Tsai
Backend engineer

Introduction

On August 4th, Cloudflare published an article accusing Perplexity of “stealth, undeclared crawlers to evade website no-crawl directives”. Later the same day, Perplexity published a response, arguing that Cloudflare misunderstood how AI agents operate. This debate isn’t just between two companies—it highlights a growing tension between AI solution providers and content creators.

Load OpenStreetMap data into PostGIS

· 5 min read
Ivan Tsai
Backend engineer

This article will load OpenStreetMap's map data into a Postgres database to facilitate the creation of a Tile Server for our later use.

OpenStreetMap Data

OpenStreetMap (OSM) is GIS data provider available under an open license. Similar to Wikipedia, anyone can edit and contribute to the data. As long as you credit the data source contributors in your service, OSM data is freely available for use under the ODbL license.

OSM data includes nodes (buildings, entrances, etc.), ways (routes, areas, etc.), and relations. For example, here's a segment of Zhongshan South Road data, indicating the nodes the route passes through, as well as the name and type of the route.

How Online Maps Work

· 4 min read
Ivan Tsai
Backend engineer

Recently started a new project because I wanted to create online maps using my own data. Services like Google Maps offer limited customization options, so this series of articles will guide you in building your own maps without relying on external services (though map data still needs to be obtained from a provider). It will cover both the backend map database and frontend rendering.

How to Manually Read TypeScript SourceMap

· 2 min read
Ivan Tsai
Backend engineer

TypeScript SourceMap

We can generate Source Map files in TypeScript by setting compilerOptions.sourceMap = true in the TypeScript configuration tsconfig.json. This file allows tools like VS Code and Chrome debugger to map the compiled JS files back to the original TypeScript (TS) code.

However, if you receive error stacks from a production environment and want to quickly find the corresponding positions in the TS code, is there a way to do it manually?

AWS Instance Identity Documents

· 3 min read
Ivan Tsai
Backend engineer

Instance Metadata Service

Instance metadata is the information provided by AWS about your EC2 instances, including details like Host Name, Public IP, and more. This information can be accessed through the Metadata Service available at 169.254.169.254. This address is a link-local address that can only be accessed from within the EC2 instance. For example, you can retrieve the current Public IP using the following API:

curl http://169.254.169.254/latest/meta-data/public-ipv4

Implementation of IoC in TypeScript

· 7 min read
Ivan Tsai
Backend engineer

Recently, I introduced an Inversion of Control (IoC) container into a new project and found that most container libraries only provide documentation related to their own usage. There are fewer examples of actual implementations. In this article, we will use a well-known open-source project as an example to organize several good practices and the basic rules that should be followed.