Chat App Key Problems

Can the Same Process Serve Both WebSocket + Http Rquest? (why is this an important question to ask) When building the chat app, we want to serve socket traffic to tell when a user is online and have the message be send as socket data package. The application also have some other functionality such as login/logout. Those are typically served by http protocols. This is because the server has no need to push to client for these features.

Python Module Reload for Class Static Fields

Challenge I was doing a little refactor for a codebase I worked in. The idea is to collect all free form environment variables into one class to have a centralized place to manage them all to simplify maintanence work. It was a simple task on the surface, but I ran into problems when structuring my unittest. The challange was realted to how Python handles class static variables. Python Class executes once when it is first loaded and then cached.

Apisix Test Setup

I run into some challenges setting up the APISIX test. Documenting it here for my furture self. The overall step looks like this, # get source $ git clone git@github.com:apache/incubator-apisix.git $ cd incubator-apisix # prepare runtime and start apisix process $ etcd --enable-v2=true & $ make init # create config files $ make deps $ make run # install required test-nginx repo to sibling file path $ git clone https://github.com/openresty/test-nginx.git .

K3S Pi Cluster Dynamic Provision with NFS Server

Cloud provider like AWS, Azure, and GCP alredy have dyncamic provisioner setup. So when their user create resources like PersistentVolumeClaim, the resources gets automatically provisioned. Homelab cluster does not have a dynamic provisioner set up already, we are going to create one. The high level strategy is to use Synology as NFS server and have my pi cluster to deploy a NFS client as the provisioner. Set up NFS server Synology NAS