Skip to main content

6 posts tagged with "Advanced"

View All Tags

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.

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.

ExternalTrafficPolicy of Kubernetes

· 10 min read
Ivan Tsai
Backend engineer

Introduction

Recently, our company switched to using Nginx ingress controller with a L4 Load Balancer to handle incoming traffic, replacing the previous use of Application Gateway. During deployment, I discovered that the official default setting for ExternalTrafficPolicy on the Service is set to Local (Ingress-nginx Azure deploy.yaml), as mentioned in the AKS documentation. It was also noted that if we want to preserve the client's source IP address, this configuration is necessary.

After some exploration, it was found that this is related to how Kube-proxy handles incoming traffic, which helped address the implementation issues I had with K8S Service. This article aims to document my findings. 🎉