PGSimCity - How PostgreSQL Works

(nikolays.github.io)

266 points | by jonbaer 4 hours ago

22 comments

  • layoric 3 hours ago
    I love what is trying to be done here. Some feedback to improve would be to cut out a lot of the noise with the "Take tour". There are too many boxes and things changing on the screen to get a sense of what is happening. Also make it interactive rather than automatically switch onto the next subject. Being a passive observer to so much information trying to be conveyed is very confusing.

    I really do like these kinds of approaches to showing the inner workings of different kinds of tech, so think this is on the good path to being a very useful tool, but needs some focus rather than more data/graphs/info boxes.

    • titzer 3 hours ago
      It's amazing 3D going on, and then 80% of the visual space is popups that completely block it. It'd be have a nice prominent ways of reducing the noise, and that pops were partially transparent.
      • npl 2 hours ago
        Yea on mobile especially
        • samokhvalov 1 hour ago
          I hear you. WIP!

          thanks for all the feedback. It's amazing for me too. It all started yesterday with a single prompt and curiosity what Opus 5 can do.

          ~3.86B tokens used so far (not counting GPT 5.6 Sol that at some point started to do a lot of legwork for coding)

          • yieldcrv 1 hour ago
            single prompt Claude Design before putting it in Claude Code
    • andyfilms1 1 hour ago
      This is good general advice. If your software needs a "tour," that's a good indicator you should work on your UX instead. If you're just excited to tell the user about a new feature, they'll discover it when they need it.
      • appplication 1 hour ago
        I think in this case a tour is fine and sort of the point. But I disagree with you generally.
  • jedberg 4 minutes ago
    I have a pretty good working knowledge of the internals of Postgres, but this just confused me. I think it's too busy to understand. At the very least, it would be cool if there were a "slow down" button.
    • augunrik 3 minutes ago
      There are buttons on the bottom left: pause and two to adjust the speed (down to 0.1x). Some parts of the city can be adjusted when you click on it (I just found the transactions/s)
  • narmiouh 3 hours ago
    I imagined as soon I saw the initial visual that I would somehow be able to enter a query and it would walk me through the flow through the entire system starting from input parsing to all the way to delivering output and perhaps along the way understand some of the autonomous processes that happen in parallel that aren't query specific but run constantly.

    What others are saying - fantastic attempt, but don't know where to start or where to end.

  • LowLevelKernel 4 minutes ago
    Wow. Can’t wait to explore the architecture
  • Curtis_Guan 3 hours ago
    Understanding how scheduling works inside a database used to require numerous architecture diagrams to explain. I was amazed when I saw PGSimCity — it presents such a complex technical implementation process in such an engaging way. Since it's already open‑source, I think the same idea can be reused in other domains, such as cloud computing, Kubernetes, and so on.
    • tptacek 2 hours ago
      I've always wanted to do an explainer of the deployment system and state-tracking at Fly.io using Factorio as a visual metaphor.
      • MitziMoto 2 hours ago
        I heard you have some free time now, so let's see it!
  • arjie 2 hours ago
    I can't believe "Rendering The First Frame..." is not "Reticulating Splines..." :)

    Cool UI.

  • manytimesaway 1 hour ago
    Besides the sadly obvious vibe-coding, just note that SimCity is still an active trademark from EA, so might be good to rename it.
  • loveparade 3 hours ago
    I don't know what I am looking at but it is fabulous.
  • luciana1u 1 hour ago
    3.86B tokens to build a visual simulator of a database that runs on a fraction of that compute. we're using the expensive brain to draw pictures of the cheap brain.
  • skreem 3 hours ago
    This is really cool, I like having visualization to hold on my head!

    Also (assuming this is LLM-generated, apologies if it’s not) seems like the future of learning/self-teaching… gonna try and generate similar things for stuff I’m learning

    • smhaziq 2 hours ago
      it is in the commit 'Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>'
  • dostick 2 hours ago
    It surely is impressive,but it’s just that - components of db service as buildings/machine. What it needs is narrative, purpose, with main actors clearly defined - client and data. demonstrating what is involved in the chain when data’s written and requested.
    • computomatic 2 hours ago
      Try the tour. It’s exactly that.
      • samokhvalov 46 minutes ago
        yep (via pressing T)

        but I agree, could be better – thinking

  • num42 2 hours ago
    Really great work! I've always wanted to build a CPU simulator(Full PC simulator) in this style. I still haven't fully figured out my own approach, but this will definitely be an inspiration for me. Thanks for making and sharing it.
  • gregsadetsky 2 hours ago
    Great work! When zooming out a bit, I'm somewhat sure that the 'blinking'/glitching is due to z-fighting. Just something you may want to look into (ie move 3d surfaces so that they're not at the exact same z)
    • samokhvalov 48 minutes ago
      Correct -- z-fighting on coplanar ground surfaces. Fixing with explicit offsets.

      thanks

  • bazzingadev 1 hour ago
    Wow, cool projects are so back again
  • npunt 2 hours ago
    This is very cool, just some UX tips to make it more legible:

    1. remove ~50% of the UI since it covers too much of a laptop screen

    2. improve the camera controls so its easier to pan and zoom.

  • BowBun 2 hours ago
    Amazing, great work. Keep polishing this up!
  • deadbabe 2 hours ago
    Someone should make a movie called “Postgres” which is about people living within a Postgres city, in the style of Se7en.

    “Every city has secrets. Ours have indexes.”

  • Jonathanfishner 2 hours ago
    thats cool. n1. spent 15min looking on it rn
  • abstrct 2 hours ago
    This is amazing!
  • npl 3 hours ago
    Love this
  • bibimsz 2 hours ago
    i understood all that.
  • codedump 1 hour ago
    [dead]