Private messages #announcement fstdt.com blog

I've been letting my modly minions handle approving quotes and moderating comments for the past few days because I've been spending the couple of hours I can allot to FSTDT-time a day working on a change to FSTDT that you can finally actually see and use: a private-messaging system! This whole idea developed out of the need for a convenient way for my modly minions and I to keep in touch, but I figured why not let everybody use it?

Right now it uses a separate SQLite database to store messages, partially to ease the burden on the database server if I use the SQLite database when the PM system goes live, but mostly to simplify testing and a massive performance increase. The finished product will obviously still use the user-accounts table in the main database, but if everything works out, I will keep the SQLite database for messages, because SQLite is extremely fast, can be made secure with a little work, and this is exactly the sort of 'light database' SQLite was intended to handle.

[aside]Edit: Asked permission from the host, was told no even though there is nothing in their terms of service that could interpreted or construed to the effect that using SQLite or something similar was not allowed. Figured this host was more expensive than average because it had better than average service and was liberal in what they let you do with your share of resources on their servers so long as it was legal and within reason. But nah they're just overpriced and evidently have two terms of service: one they let people see, and a 'secret' one whose terms you apparently have to figure out by breaking them and getting your account suspended. Complaining to them ain't worth my time, because if they gave a shit their service wouldn't be shit in the first place. I'm half-tempted to scrap the current PM data code and set it up so it uses a .NET DataTable whose DataSource is a flat XML file. Would use substantially more server resources than SQLite.

And that's all I have to say about that aside from the fact that we will be not be renewing our hosting account here. We will instead be moving FSTDT to a relatively high-end Linux/BSD dedicated server plan elsewhere that lets you roll your own shit, and I will set the server up to run FSTDT with nginx + Mono / ASP.NET core + PostgreSQL like I wanted to begin with. I am much more familiar, experienced, and competent with *nix servers, especially when it comes to web servers and databases. We may even make the move a little before this account expires so it coincides with the Shavy-era FSTDT rewrite. (Amusingly, every admin of the site thus far has rewritten its code to suit them.)[/aside]

Progress on the new PM system
+ Database schema
+ Module (static class or struct in C# speak) for database access that handles all SQL queries and abstracts working with a database away from the main code, but I'll likely be making small changes to the queries that return lists of messages to retrieve one 'page' at a time (one page = 25 messages) so I can paginate message lists.
+ Abstract base classes (MessageList, PagedDataNavigator, Message, and Message's child classes MessageWrite and MessageRead) — for non-programmers this more or less means I did a skeleton or 'outline' to put most of the code and now have to 'fill in the blanks' with that code.
+ Most of the code generating the HTML table for message lists, probably one of if not the hardest part because I decided to write it by hand.

As you can see, I'm about one-quarter to one-third of the way finished. Much of the code is pretty generic, and a lot of it can be reused in other parts of the FSTDT rewrite: PagedDataNavigator was already written for it, and the Message, MessageWrite, MessageRead will likely form the foundation of similar code for quotes and comments.

One more thing: Pepe's probably pretty salty right now. Hasn't been able to get a message through in five days and counting, but I'm not calling 'victory' until it's been a week. Even then, something of his will probably manage to slip through every now and then, but at nothing near the old pace of his textual diarrhea. Hopefully it require enough work to get rid of him for good.

0 comments

Confused?

So were we! You can find all of this, and more, on Fundies Say the Darndest Things!

To post a comment, you'll need to Sign in or Register. Making an account also allows you to claim credit for submitting quotes, and to vote on quotes and comments. You don't even need to give us your email address.