Replacing the Clojurians Slack log

One of the main on-line hangouts for Clojure people is the Clojurians Slack community. Unfortunately it suffers from its popularity. Slack will only retain the last 10,000 messages of history, which means that less than two weeks of logs are kept available.

A lot of valuable information is in that chat history, and so as a service to the community people set up a logging service back in 2015 so that these logs aren’t lost in time. (I believe it was Ruslan Prokopchuk , but if anyone can fill in the gaps in this history please do!)

In 2016 they were looking for someone to take over the hosting and running of the logs, and I agreed to do so, so since then it’s fallen on my shoulders to keep it running.

The setup so far was a bunch of python scripts, plus some node-based tools to generate the index pages, plus cron jobs and glue. I set up a VPS in 2016, got everything running, and left it do its thing. A few small improvements have been made since then, like making individual messages linkable, but mostly it’s stayed unchanged.

There were several things I always wanted to improve, for instance not all of the markdown that slack supports renders correctly, or it would be great to have links to navigate to the previous or next day of logs, but I’m not that good in Python and don’t really enjoy doing it, so these things never happened.

In November finally the site stopped updating. Because the amount of logs had grown so large (currently 1.7GB of JSON files and rising), some of the scripts were running out of memory. Messages were still being logged (luckily), but the site was no longer updating.

I decided that this was an opportunity to replace this with something that I myself could more easily work on and improve, and something that the community could more easily contribute to.

It’s all taken a little longer than planned, but at last I have some things to show. The app is on github as clojureverse/clojurians-log-app, it’s a simple Ring app, backed by Datomic. I was first going to go with plain PostgreSQL, but I figured using Datomic would make it more fun for me and for others to contribute. The flip side is that it’ll be a bit more costly to host, since Datomic performance relies on it having lots of memory to chew up.

The app isn’t perfect yet, but it’s working. A first version is up on the clojurians-log-staging.clojureverse.org domain. It’s quite slow right now, but there are still several things that can be done to improve that. Mostly though I’m planning to rely on CDN caching.

A big difference with the previous setup is that the complete setup and configuration is done through
ansible. You can check out my ansible-playbooks repo to see how things fit together. Deployment is done with a simple “git push”, similar to services like Heroku.

I think this can be a great project for people to contribute to, it’s small and self contained, but also has a real use. I’ve created a few issues of some of the most obvious things that still need doing on the app itself. I’d be happy to pair on these issues, or provide feedback and mentoring, especially if you still consider yourself a junior, or if you’re new to open source development.

There are still a few admin/opsy things that need doing before it can replace the main site, mainly setting up the CDN, and having it automatically import the new logs, but I should get to those soon.

Thank you all for your patience!

33 Likes

Woohoo! Thank you @plexus for keeping logs and replacing that bunch of hacky scripts with proper app. Clojure community is one of the best I ever met because of awesome people like you.

Thanks for this update, I actually thought the whole thing was defunct and have been considering making a clojurians slack log viewer as a Hyperfiddle demo. If you’ve done the hard part of integrating slack data into Datomic, but not too much UI work perhaps we can help with the UI? http://www.hyperfiddle.net/

1 Like

The staging link (http://clojurians-log-staging.clojureverse.org/) is not working right now?

Yup, that’s going to happen sometimes, that’s why it’s called “staging” and not “production”. Seems the app dies with an OutOfMemoryException.

I’m ironing out the kinks in the Ansible scripts, after that I’ll spin up a new machine with more RAM that will become Clojurians-log’s home for the foreseeable future.

Thank you for originally starting this initiative in the first place! The fact that we have these logs going back to 2015 is a really great asset to the community.

Cool cool, thanks. Really appreciate the time you are taking out for this.

http://clojurians-log-staging.clojureverse.org/ is back online, this time with several improvements contributed by the community. Rendering is much improved, it’s easier to navigate to the previous or next day, and there are caching headers present.

This is on a new machine that’s a bit beefier. All things going well I plan to promote this installation to “production” (i.e. replace the old log that’s still running at clojurians-log.clojureverse.org).

I’ve added a free Cloudflare plan, which should help to keep delivery spiffy, but that will only kick in later today so I haven’t been able to test the difference yet.

I also imported the latest messages, so we’re all up to date again.

3 Likes

Thanks very much for your hard work on this! Having logs of conversations is an invaluable resource.

How rapidly are new channels discovered? I noticed that #clojure-denver is not yet displayed in the logs, even though the channel has existed for about a month.

Invite logbot to the channel and it should get logged. I don’t think we auto join channels at the moment.

Thanks for the help! I didn’t know about logbot before. TIL…

Apparently I can’t enable Cloudflare for just a subdomain, it requires to be the DNS server for the top level domain as well, so I’m switching clojureverse.org over as well. Some users have reported in the past that ClojureVerse was a bit slow for them so maybe this will help with that as well.

This is slightly scary, if we’re briefly out of the air then it’s because of the switch.

BTW there’s some really cool stuff already happening on the app, we’ll soon be able to share messages and have them show up all nicely rendered like this. Thanks Jonathan Hsie for this great feature

Also giving a shoutout to John Andrews and @camachom for message rendering and the date navigation links!

@plexus is clojurians-log-staging.clojureverse.org supposed to collect logs right now? The last logs are from March 5th right now, e.g https://clojurians-log-staging.clojureverse.org/cljs-dev

No, it’s not real time yet. No logs are lost, they’re just not imported yet.

1 Like

Relay Chat has setup a (http://relay-chat.com) instance for Clojurians, with bridges to and from the Clojurians Slack. There’s no 10k message limit, and this instance is free! Join them at https://goo.gl/Tdsfv4 hat