Subject: An update on T-Board
Author:
Posted on: 2015-07-23 06:03:00 UTC

While the citizens of Plort debated about what should be done to end the scourge of the Green Ads, they bade Sir Tomash go to Baron Dann and ready his arcane spells so that a new capital could quickly be raised. Tomash went out to his tower and began to rework his spells, as the alignment of the stars had changed greatly since he had meddled with the deep magics of Waeb.

While he was researching in the famed overflowing library of Stack, Tomash learned, to his dismay, that he had made a grave mistake in his previous work by failing to make the correct offerings to Post-Gress, the god of memory. His mistake would have doomed all who lingered in his new city to great difficulty in remembering what they had said before. Thankfully, Post-Gress has been placated by ritual offerings and the chanting of an ancient prayer during darkest night.

Now, Tomash must change his spells to match the position of the fickle Framing Stars. He must also prepare to raise a new island from the oceans of Weab, for the land in which he weaves his spells, Hero'ku, has begun to reject his magic. If the many citizens of Borrd move to the new island, they will need to make small offerings to the sea-gods, lest their land collapse under them. The barons know this, but generally believe that the gods can be easily kept content with a small portion of the many goods produced in Plort.



Ok. Non-Plort version.

There are two main causes of the slowness that people are feeling on T-Board. The first is that, whenever the board doesn't get any traffic for ~15 minutes, the host shuts it down to save on resources. When someone tries to visit later, it takes several seconds for everything no load before the code can start running. This won't be an issue on real hosting.

The second problem is that I actually did fail to speak the correct magic incantations. Basically, you can tell the database "Hey, I'm going to use this column to search for stuff, please make an index". In our case, we'd often need to search using the list of parents of a post to see what posts were in a thread. This was done by looking for lists that started with a certain sequence of characters. To make those searches fast, you have to tell the database to create its index in a special way, which I just learned about yesterday. That issue has been fixed, and the time it takes to get a list of all the posts in a thread (in order) is down from ~120ms to ~2ms, which drops page rendering from 8-10s to 1-2s.

Heroku (where I'm hosting this demo T-Board) had announced some changes to its hosting plans a while back. One of them is that free apps will soon only be able to run 18 hours a day, which obviously won't work for us. (Heroku wasn't a good solution anyway, since they wanted an arm and a leg to run the search engine T-Board uses).

T-Board is kind of somewhat ready for migration now. However, many of the libraries T-Board uses (like our web framework) have undergone some pretty significant updates since the last time I've worked heavily with the code. In order to keep getting nice things (like security updates), I need to go back and modernize T-Board a bit. That'll take opti-realistically a man-weekend or two to do that, so I'm pretty confident I'll have this done near the beginning of next semester. (Programming estimates are hard.) This gives us a bunch of time to decide on certain, erm, logistical difficulties. (The hosts I mentioned below can be pre-paid via PayPal, which is nice)

hS, you asked about maintainability. I personally feel that my code is around 7/10 maintainable by someone else if I get hit by a bus. T-Board is actually a relatively small program that rests on a bunch of libraries that do the hard stuff (like user account management) for us. If anyone wants a look at the guts, all the code is here

Reply Return to messages