Middleware
Containerized Deployment of a Multi-Node FoundationDB Cluster and Operations
· ☕ 5 min read
1. Generate a Cluster ID 1 cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1 The examples below use CLUSTER_ID=fKbIga9RHP79OIx1. 2. On the First Node Configure environment variables 1 2 3 4 5 6 7 8 9 10 export CONTAINER_CLI=nerdctl export IMAGE=foundationdb/foundationdb:7.1.26 export CLUSTER_ID=fKbIga9RHP79OIx1 export FDB_INSTANCE_NAME=fdb_server export FDB_CLUSTER_FIRST_IP=$(hostname -I | awk '{print $1}') export FDB_PUBLIC_IP=$(hostname -I | awk '{print $1}') export FDB_PORT=4500 export FDB_DIR=/data/ops/fdb/$FDB_INSTANCE_NAME Clean up old data 1 2 3 $CONTAINER_CLI rm -f $FDB_INSTANCE_NAME mv $FDB_DIR $FDB_DIR.

RabbitMQ Message Queue
· ☕ 3 min read
1. Where a Message Queue Fits 1.1 Asynchronous Processing Use case: after a user registers, a registration email and a registration SMS must be sent. With the synchronous approach, system performance (concurrency, throughput, response time) hits a bottleneck. 1.2 Application Decoupling Use case: after a user places an order, the

Error Code Design and Unified Exception Handling in Django
· ☕ 6 min read
I currently use Django for SaaS development, and I develop and maintain several SaaS applications at the same time. Many SaaS applications have agreed-upon error codes, some used to handle login state, others to mark business logic status. For a feature that is so strongly shared across projects, it is