173 points · by ksec · 4y ago · 39 comments
In any case, I wrote the original code for Thredded and it's since had the stewardship taken on by two very smart and capable gentlemen named Gleb and Tim.
In recognition of the 1.0 release I wrote up a short blog post with a little history and background on the project (spoiler: the first version was born 21 years ago!), and congratulating the 2 guys for their work the last 5+ years. They've done an incredible job, and I only wish we'd all met 5 years before.
https://joeloliveira.com/2022/03/04/weeknotes-for-the-week-e...
In terms of features, the breadth of their product is larger, more complex, more opinionated. Thredded, on the other hand, hopes to get out of the way if and when you want it to (just look at what @druseph did with notebook.ai/forum).
They did a great job, though. They built a sustainable business on the foundation of "internet messageboards" and for that I applaud them. That was always my goal and I never got there, sadly. That was my dream.
In all fairness, it's been years since I've looked at Discourse so my assumptions may be out of date at this point. Take all this with a grain of salt.
I ping 15ms to your server but page load times are 500-600ms on most threads (10 or 3,000 replies doesn't make a difference). This is checking out the Rails app server response in dev tools.
I have had some occasional backend issues in the bigger threads from things like notifying all users of responses in a 20k-post thread, but I think that's more on me for not having anything to scale up more workers as needed. In general though, most things Just Work.
The project i adjusted was an old rails 3.2 code base, and in addition to fixing some missing db indeces - the caching sped things up significantly (10-100x, from atrocious to acceptable).
I sometimes get the feeling that no-one using rails ever read the cache section in the guide.
https://guides.rubyonrails.org/caching_with_rails.html
Caveat: there may be callbacks and authorization hooks in thredded that hamper this approach in practice.
For a new project i would probably try and go with "fresh when" (http caching) and varnish or fastly.com in front.
But fragment caching can make a lot of difference too. More than I expected.
Ed: although I can see why it might be missing - the upstream demo feels plenty snappy - so for most uses, extra caching might just be extra complexity for little gain.
Also surprisingly not that much RAM usage. Are you using Sidekiq too where this is included in the number of dynos you run? What's neat is (and I'm not recommend switching) it sounds like you could host a massively popular forum and throw it onto a single $48 / month DigitalOcean server with 8GB of memory and 4 CPU cores if you wanted to. I get wanting to use Heroku but for folks who are ok with self hosting that's really affordable for such a popular site that has quite a lot of writes.
A cold page load on any old StackOverflow answer page is about 50ms for me. Keep in mind the hosting environments between both sites too. The forum site is on Heroku. StackOverflow is running on https://stackexchange.com/performance, basically hundreds of CPU cores and multiple terrabytes of RAM on dedicated hardware. There's no doubt .NET is going to crush Ruby even with the same hardware tho.
> StackOverflow manages sub 20ms response on nearly all pages time with zero caching
I'm not sure where you read they don't cache anything? They cache a lot of things. They have an in depth article on this at https://nickcraver.com/blog/2019/08/06/stack-overflow-how-we.... They're also serving a lot from a CDN to give end to end low latency responses across the globe.
Literally have been discussing with our devs what we can use that's as off the shelf as possible for a HN style community.
They said it would be best if it was built with RoR. I see this post randomly when I can't sleep at midnight.
It's the software that runs https://lobste.rs/ - a smaller community, similar to HN.
I use the length of a demo video as a first-order approximation for how much work is involved in getting something up and running. I happen to subscribe to DR, and can see the full video demo is 9 minutes, meaning it's probably quite painless.
I will be trying Thredded soon!
> Use the online RAM firewall, then you can override the neural protocol!
> You can't parse the JSON without calculating the auxiliary AI pixel!
Super clean and I always love the idea of drop-in forums that integrate with your application.
Just by eyeballing a few of them it looks like the Ruby Faker gem https://github.com/faker-ruby/faker. There's direct references to it such as the Stormtrooper line in https://github.com/faker-ruby/faker/blob/master/doc/movies/s....
Edit: My curiosity regarding USENET was piqued after seeing DFeed on here, a forum front end to USENET, made for and in use at forums.dlang.org.