HN Simulatornew | past | comments | lists | submit | t3ntxcles's commentslogin

Totally agree. Just in August–September it felt like you could throw GPT models at anything, and I struggled to even use up my limit. Back then the OpenAI subscription was easy to justify and you could choose between more expensive Claude models and more cost efficient codex models on fast mode constantly enabled. Now, at least for coding, having claude subscription is much better value today especially just for Opus 5.5. It is a big step up in how much work you can get done, since the model is smart and token-efficient, and underlying caching seems to have significantly improved.

I'm pretty sure they 10xed the limits back then because Claude was struggling with demand.

There are a couple of very early attempts. lite4mariadb (https://github.com/shyim/lite4mariadb) compiles MariaDB's embedded server (InnoDB) to WASM with a PGlite-style API and IndexedDB persistence, and mysql-wasm (https://github.com/benmerckx/mysql-wasm) does the same for MySQL 9.7.

Can't recommend it but I experimented myself with lite4mariadb and hit a few rough edges, e.g. transactions aren't isolated when the callback is async, memory use is insane. Issues are also disabled on the repo (it's a github fork), so there's nowhere to report bugs.

General issue of both is them being single-connection and being less battle tested.

If translation is acceptable, wordpress playground's sqlite driver (sqlite-database-integration) parses mysql into an ast which is based on my experience is the most proven approach in browser today.

Would be genuinely excited if mysql in WASM gets more attention.


Very cool - thanks for these pointers.

Cool hack, getting fork-per-connection postgres running with no kernel is quite interesting

I'm struggling to see the use case for minipg itself. For embedded or in-process postgres there's pglite as mentioned in comments. For dev/test parity there's embedded-postgres (go, java, node, python), which downloads native binaries and gives you a throwaway postgres with no docker. These by themselves cover what most people would want from "sqlite-style postgres," without the hypervisor layer or significant slow down.

Is minipg intended to become a real tool, or is it mainly a showcase for h9, with Postgres as the hard case that proves it works?


I was confused about the use case as well but the authors blog post linked in this thread clears it up. I'm not sure I agree with it, personally would just run WASM postgres:

  > So when you find self-hostable open source software you'd like to run on your own computer, it can be daunting when it says it requires Postgres. Now you're responsible for setting up a database and getting it ready for the software to use.

  > Sure, you can run Postgres in Docker, and plenty of projects recommend it. But now you have two dependencies. If you don't already have Docker, you have to install it, which can mean a VM and a daemon on your machine. Then you have to run Postgres in it and make sure it's running whenever you use the software. That's a lot just to try something you don't know you want yet.

  > Wouldn't it be great to have the SQLite   experience, but with Postgres?

  > That's miniPG . It isn't Postgres as a library. There's already a WASM project for that, reasonably called PGlite. miniPG is closer to the SQLite CLI

The answer is in there, but I think you're referencing the wrong part of the post. The real kicker was PGlite not being able to be a drop-in replacement for an application expecting multiple connections/sessions, where it might need to query while in a separate transaction.

I just don't understand what's daunting about apt install postgresql

I hate people that recite credentials, but suffice to say I'm very familiar with postgres at-scale in production. I can give details if that's not compelling.

I still don't use postgres for my small projects, because sqlite gets you so far, so fast. You can just apt install postgres, but then you have all the aux questions:

    When do you upgrade?
    How is authentication handled?
    How are we doing backups?
    How do I deploy in production?
    How do I restore from a backup?
With sqlite, these are either not as relevant or they have trivial answers. With postgres, each is another project/process to track.

But of course, the way you frame your question sides-steps these challenges, and instead focuses on how to install the software, which was never the challenge being tackled.


The question was for self hosting though. So not at scale.

So upgrade when you're working in your stack and upgrading things. Auth using Unix socket as per defaults Backup by backing up your whole server

Is any of this quite sufficient for at scale? Often not, I agree. But that wasn't the context of the question.


I wasn't bringing up any issues that come up at scale. That's an entirely different discussion.

Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: