+-----------------------------------------------------------------------------+ | | | Some Thoughts on BBS Software Design | | | | by D!99y Dud3 | | | +-----------------------------------------------------------------------------+ Well, I'll be phucked smooth and hard if I can get a textphile to upload on Particles! BBS these days. I must've tried uploading the last issue twenty times before I gave up on the enterprise. Just because I have the patience of Job doesn't mean I'm gonna use it all on uploading one phile to one bored. If any of you pholks are members there, do a brother a solid and upload this phile and my previous one there for me, will ya? I'm not getting the point of using XMODEM or Punter over a TCP connection anyway. TCP already does everything those old modem protocols do, and better. It's not like you're going to overflow the receive buffer in your Trash-80 when these little ESP8266-based adapters like TCPser and what-not have enough RAM to hold dozens of floppies worth of stuff. They must do it because there's still that one guy in Buttfuck, Nebraska, who has a genuine copper twisted-pair fone line. It's probably Matt Ackeret. Get cable, ya old phool! I've been meaning to build me one of those TCP-to-serial adapters but haven't got around to it yet. I have two or three ESP8266s in the lab, and I've posted some preliminary code to Github. I was going to write an IRC client for it until I leaned that writing even a minimal IRC client entails implementing a huge chunk of the IRC protocol. The drive-by "instructable" bloggers never tell you all of that when they go putting these grandiose ideas into your head. Anyway, while I was dicking around with that, the user interface on most BBSes started getting on my nerves, and I started wondering how hard can it be to design a UI that doesn't have forty phucking options on every menu, or require you to drill down through five or six menus just to perform a simple task like reading a thread? As it turns out, it's pretty goddamned hard. Web developers don't realize that the Web server and the Web browser do about 80% of their job for them. Which means that practically every "programmer" I know, including myself, is really just a script kiddie. Well, I don't want to be a script kiddie. It hurts my pride something awful. So, being the tenacious son of a bitch that I am, I set out to remedy the situation. And I think I've suceeded. I think my approach, like most of the solutions I engineer, is a novel one. Or, if any other BBS designer has come up with the same architecture, he's sure as shit doing a good job of keeping quiet about it. My first break came when I saw W. Richard Stevens' seminal tome, UNIX Network Programming, mentioned in a Stack Exchange thread. Like any God-phearing pirate would do, I naturally searched for and found a free PDF download of said book. At this point, I beg the kind reader's indulgence in a sidebar, in which I shed light on some of my decisions which many seasoned programmers will find questionable. The proof-of-concept implementation will be written in PHP. Yes, a scripting language. A good dozen Asperger's-ridden Captains Obvious will trip over their shoelaces as they lunge for the reply button to lecture me about how PHP isn't an ideal language for this kind of application, and how I should use C or C++ instead. Yes, I know. But I also know what my vision is, and you don't. First off, the socket and process control functions in PHP mimic the underlying UNIX system calls and library functions closely enough to demonstrate the concepts in Stevens' book to the aforementioned script kiddies, which is the main point of the exercise. Secondly, programmers of modest skill will be able to easily extend and customize the basic package, build their own doors, etc., by studying the modules provided in the basic package. I suspect many aspiring sysops will find the learning experience far more rewarding that editing a ton of configuration files for a compiled program. Which answers the age-old aspie question of why reinvent the wheel? There are still a few of us phuckers left who actually want to learn the nuts and bolts, all right? If you're one of those incurious phaggots who would rather instantiate ready-made node.js server classes than learn real UNIX programming, more power to you. This isn't for you. Finally, although PHP is "just a scripting language," I happen to know from previous experiments that it's more than adequate for the task. Let's continue, shall we? We'll start with the standard UNIX server model, in which a parent process listens on a socket for incoming connections, and spawns a child process to service each client. Nothing novel about that. Straight-up textbook stuff. Here's where it gets interesting. The child process will be like a cassette jukebox. Every menu, message list, file reader, and so forth will be like a tape that can instruct the jukebox to load another tape and play it. The user will be able to move back and forth between tapes, and each tape will be in the same position it was in when the user last played it. That's how the program will maintain the state of each module for the duration of the user session. Neat, huh? Best of all, the program will be absolutely free, as in free beer. You can copy it, modify it, share your modifications with other sysops, or whatever. It'll be available on the BBSes listed below. Except someone else will have to upload it to Particles! for me because I don't have the patience anymore. ------------------------------------------------------------------------------- This has been another riveting communique from D!99y Dud3 at the Department of Demented Development. You can find all premium D!99y Philes (TM) on these fine, scholarly BBSes. Feel free to copy and distribute this phile to all other boards with this notice intact! Agency BBS Sysop: Avon telnet://agency.bbs.nz Borderline BBS Sysop: Balzabaar telnet://borderlinebbs.dyndns.org:6400 Particles! BBS Sysop: Paradroyd telnet://particlesbbs.dyndns.org:6400 -------------------------------------------------------------------------------