Hacker News new | ask | show | jobs
by capableweb 1200 days ago
Cargo culting. If you never used SQLite, anytime you need a database you use whatever you've used before without shopping around or considering if what you're about to use is right.
2 comments

Hang on a second- this project looks to be assuming that the db will be remote and over the internet. Even the SQLite official document recommends people to use PostresSQL in that scenario [0]:

>Generally, if your data is separated from the application by a network, you want to use a client/server database. This is due to the fact that the database engine acts as a bandwidth-reducing filter on the database traffic ... Use a client/server database engine. PostgreSQL is an excellent choice.

[0] https://www.sqlite.org/useovernet.html

No, the project has two parts. One server and one client. The client obviously runs on a different host than the server, but nothing in the architecture says that the server and the db has to run on different hosts.

You can also see that the pgrokd.yml config example is connecting to the database via localhost, so running on the same machine as "pgrokd" (the server part of pgrok).

My mistake it looks as though the desiderata was single client/server db backend in the first place, and remote db was just an added bonus of that - https://github.com/pgrok/pgrok/pull/11
I guess... That's too bad, this project looks great but having to install/connect Postgres is putting me off installing it.
If you want a similar project which 'just works' then consider using zrok. Its fully opensource which you can self-host or use the free hosted version - https://zrok.io/
Yeah, in better news though, it seems to be using gorm which has different drivers available (https://gorm.io/docs/connecting_to_the_database.html), SQLite being one of them. So unless they are doing something postgres specific, should be relatively easy to switch it out.