Operation: Harsh Doorstop Server and Mods Viewer
This site features a couple of utilities that I felt were useful for maintaining an up-to-date Operation: Harsh Doorstop dedicated server. It started as a quick means of identifying whether my mods were on-par with what Steam's workshop was serving up and I thought others may find the functionality useful. I may expand it to send notifications when an update triggers, I dunno.
How does it work?

Microservices, yay (but only when/where they make sense)

  • 1x Steam Master Poller
  • 1x OHD Server Poller
  • 1x Steam Workshop Poller
  • 1x Steam Workshop Downloader
  • 1x FastAPI App
  • 1x Flask Webapp

1: The Master Poller queries the Steam Master every 30s to get a listing of all "active" OHD servers. If it sees a server that doesn't exist in the db, it adds it. It also publishes this information to a redis channel.

2: The OHD Server Poller queries all the OHD servers (via A2S) found in the db (thanks, master!) and updates the server's entry in the database with their current rules/info. OHD places the list of mods installed (Not necessarily in-use, just installed) and the version running on the server into the rules output which we can extract and make use of. This worker fires off every 10s but since the queries run synchronous, it's closer to every 30s with the current amount of servers (60 give/take). If values like map_name, player_count, etc differ from what is in the db, the changes are published to a redis channel.

3: The Steam Workshop Poller grabs the mod ids that we got in the last step and queries the Steam Workshop API every 60s (chunked into groups of 20, I've had luck up to ~50. may extend this to cut down on API calls at some point). These values are placed into their respective mod in the db. If the poller sees that the time_updated entry differs from what is stored in the DB, there must have been an update! The poller then publishes the workshop id to a redis channel.

4: The Steam Workshop Downloader is subscribed to the aforementioned redis pubsub channel. When the Workshop Poller publishes a workshop id, the workshop downloader receives it and kicks off steamcmd to download the mod locally. It pulls the uplugin file that is packaged with the mod and reads the version info from it. It takes that version info and jams it into the db under the associated mod. Finally, that information is published to a redis channel.

5/6: FastAPI serves up models from the db and websockets to allow live-updating in the browser. Finally, the frontend flask webapp serves up the content via an nginx proxy.

The entire thing is orchestrated by docker, powered by Python3, and backed by a MariaDB instance because FUCK THA POLICE!

Is the site design poor? Yeah, it's pretty bad. I'm pretty terrible at crap like that. While my day job keeps me pretty on-point with architecting, building, and securing complex application environments, it doesn't really lend itself much to making things purty.

Critically Important Quotes

This is some real bullshit, I fucking shot that dude!

The fuck do you mean this free game doesn't support this one oddball ass feature that I believe to be absolutely necessary??? I want my monies back.

why the hell do people seem to think sqlalchemy is The Way... There's a thousand NoSQL databases out there, why are you bashing your head against SQL89

DISCLAIMER: This site is in no way affiliated with OHD or @Bluedrake42. I just think the game and the whole premise around the project is pretty damn cool. See you on Discord .