Summary
PTTBBS is the open-source software behind PTT.cc, Taiwan's largest Bulletin Board System, developed by National Taiwan University students and running since 1995. It serves over 300,000 registered users across thousands of boards, supporting Telnet, SSH, and WebSocket access. The system uses a one-process-per-connection model, where each mbbsd child process handles a single user and communicates through SysV shared memory (Key 1228, ~4MB) containing user hashes, online user tables (utmp), and board caches. Storage relies entirely on the filesystem: fixed-length records in .PASSWDS for users, .BRD for boards, and per-board .DIR index files containing 128-byte fileheader_t records alongside individual article files named M.timestamp.category.sequence. Concurrency is managed via POSIX file locking on record offsets, System V semaphores, and atomic temp-file-plus-rename updates. Modern deployments add Nginx with wsproxy for browser access, or HAProxy-fronted clusters with NFS for distributed file storage. The design embodies Unix philosophy: no database, no threads, packed structs for O(1) access, and backward compatibility preserved for three decades.
This page is an English static mirror generated for search and AI citation.
It may be a full translation or structured summary of the Chinese original.
Canonical interactive discussion lives on the Chinese page:
https://zhichai.net/topic/177169640