Website and forums: Easier, Better, Faster, Stronger.

We are happy to announce that we have recently deployed our new forums, running Discourse! The provide a modern, pleasant-to-use dedicated discussion tool. We have tested them out with early adopters over the past few weeks, and they are a real joy to use. You can now participate too, at forums.puri.sm.

What’s special about Discourse? Besides the official list of features, you may want to read this seminal blog post where Jeff Atwood highlights the kind of thinking that went into its functional (and aesthetic) design, making it quite different compared to traditional forum software.

Our migration to a self-hosted Discourse instance brings many benefits:

Improving security by isolating the forums from the rest of our infrastructure;

Much better usability and user experience. The previous forums were cumbersome and frustrating to use, littered with bugs and limitations, and they just looked awful visually. The new ones are much more readable, and full of modern community-enhancing features. Using a forum should be fun, not boring or cumbersome, and I know that Discourse’s design actively encourages a sense of community and self-moderation, so I’m looking forward to seeing the results over time. We hope you’ll love the new discussion tools!

More flexible community management tools;

Better email notifications, and less noise (Discourse will not spam you with mail notifications if you’ve been recently active on the forums website);

Simplifying our main website’s daily management (previously, the forums actually interfered with the rest of the administration UI);

Better performance and resources usage.

Improved performance, fire prevention

Until now, the website and forums were sitting on the same server that was hosting a ton of unrelated processing-intensive things, so the web pages would have very annoying latency spikes (or even timeout errors) that would negatively impact visitors’ user experience: there would sometimes be page load delays of up to 20 seconds!

Our main server was actually boiling from all the load: the average CPU temperatures were between 80 and 100°C at all times, and the system load was often above 7 or 12 (instead of staying between 0.10 and 0.50), which is definitely “not normal” in my experience. With that warning sign on hand, I started digging. It took a while to isolate the biggest sources of overload through trial and error, but the Purism team is not one to back down from a challenge.

Pictured: troubleshooting the server

I’m glad to say the issue is now mostly fixed (until we find further possible optimizations). With the newly separated infrastructure, the server now has an average CPU temperature of 38 to 44°C and stays fast at all times (response times typically below 0.5 second, and that’s without a SSD on the server). More importantly, with less variables influencing each other and clouding our view, we will be able to continue investigating and improving performance further, as numbers will no longer be completely swayed off by unrelated performance hogs. We will also have the option to use SSDs if needed in the future (it was not possible due to large disk space requirements previously).

Preserving history

For the forums migration to happen, a chief concern of mine was to try, as much as possible, to preserve the data and discussions from our existing forums, as a token of respect to our community. And we had to find a reliable way to do it. We encountered a few issues:

Initially, we couldn’t get the import plugin to work. Instructions were made for a non-dockerized set-up, so it would not work inside Docker (as others had previously realized). We tried with Vagrant too, no luck. The solution would then be to setup a development, docker free, instance of Discourse, run the import on that one and then export a backup from the dev instance into production.

When we did the first successful import, we realized that all the posts made by unregistered (semi-anonymous) users had been anonymized and would show up simply as posts from “system”. The result is that you would then have topics full of posts by “system” replying to other posts by “system” with no way to know who was who. So we had to modify the import script to take this into account… and then re-do the import.

While we were doing the migration work, Discourse “helpfully” started emailing hundreds of users to give them a summary of new posts, so we saw a few users jumping heartily into the new forums. Ooops! We quickly added a pinned banner on the new forums to indicate that those were not fully ready yet, and that anything new would get overwritten when we would do a 2nd migration attempt to include the unregistered accounts. Thankfully it seems people did see our warning, as no new posts appeared as we finished the cleanup and import work for the next two days or so.

We wanted to take the opportunity to prune all the inactive (0 posts) accounts. We had over 300 of those out of 650 accounts, so we had to had come up with a script to do that too because Discourse does not batch user management (sorting and deletion) administration features. So if your account had zero posts, you will have to recreate it yourself if you want to post (no account is required to read the forums).

I’m really pleased that the migration has been completed with all previous forum posts and users preserved, thanks to Frieder, a volunteer systems administrator who recently joined our team. He deserves huge props for figuring out the intricacies of the migration and adapting the scripts to address the issues we encountered. Thanks, Frieder!

In addition to preserving the data above, we also took the opportunity to clean up the cruft. For instance, we pruned over 400 fake or unused (zero posts) user accounts, which is yet another aspect making management and security slightly easier for this piece of our web infrastructure.

Sharing the improvements

As we solved these various challenges during our migration, we naturally wanted to solve them for everybody in the future, so Frieder submitted improvements to the import scripts as pull requests, here and here. He also documented his experience (here and here) into the Discourse.org forums.

This is just another way the Purism team is contributing to Free and Open-Source software through its daily actions.

Awesome, how do I log in?

If you did not have an account before, you can simply create a new dedicated account for our forums. It’s open to all!

If you had an active account on our forums before (or if you posted semi-anonymously with your email address), your account has been migrated and you will probably have to reset your password (simply by using the “Forgot my password” feature on the login form) to get a link sent to your email address, from which you will be able to set a new passphrase/password. If you’re running into trouble, feel free to let us know at support at puri.sm