System variables blocks.
System variables blocks.This is a very old and almost vestigial part of Megistos. It was modeled after the corresponding part of the Major BBS. However, Megistos' design was very different from the design that imposed the system variable block on the Major BBS. As a result, this part of the system really shows its age. It should be removed at some point, for a very large number of reasons:
- Stability: even given the unbelievably paranoid backup policy of the system variable file, this is the most common point-of-failure for the BBS. It has numerous natural enemies, including stupidity, race conditions, disk crashes, et cetera.
- It's a binary structure (and file) and that always spells disaster for maintenance and recovery.
- Most of the fields no longer make sense. For that matter, many of the fields found in Major's system variable block weren't really applicable when I started programming the Major BBS in 1992. Having room for a single voice phone is stupid, if your BBS has 32 lines and a telnet connection. Having by-the-minute charges is silly, if you have monthly subscriptions. Having charges is silly if you run a free system.
- All of the fields here should be present because there is absolutely no other place to put them. This clearly does not hold for most fields. Even the statistics block could easily be moved to the data/stats directory where all the other statistics are. BBS names, addresses, et cetera are handled by substitution variables. No need to involve global state for things that are seldom needed.
- The system variable block was meant to service a centralised system, where everything was a single process, with a single view of memory. Megistos is pretty distributed. The BBS is split among different processes, with global state (such as it is) being kept by the BBS daemon (bbsd).
Given all that, I'm not going to document the entire structure.