Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've use this. Slightly slower, but for my use case that was fine (a small blog) and immeasurably better doing away with all the CGO hassle. Especially when I might cross compile to an Arm architecture, or some docker container that uses a different approach to the c libraries (like Alpine vs Ubuntu Server or whatever) it was always a hassle, and thats all gone away now.

Always seemed silly that one of the most popular storage technologies couldn't be accessed with pure Go.



Pretty much any database is NOT written in Go, so what's the difference?


Other databases (Postgres, MySQL, etc.) already have clients written in pure Go. SQLite does not have a client/server architecture, so a pure Go version of it requires porting (or transpiling) the entire engine to Go.


Etcd, CockroachDB, InfluxDB, Consul. There are more.


Also Bolt is pure go which is a highly performant KV store


I tested that for a while but it seemed to suffer lock contention with a lot of go routines trying to use one database at the same time.


>Always seemed silly that one of the most popular storage technologies couldn't be accessed with pure Go.

I don't know why Google didn't pay someone to do this or do it themselves. Surely they use Go and sqlite together.


You’re overestimating the influence Google as a cooperation has on Go, you think they’re gonna pay for what they’re not gonna use ?


> you think they’re gonna pay for what they’re not gonna use

This is it. They have internal datastores that they use for nearly everything. They might be using SQLite somewhere for something, but I really doubt this would even land near the bottom of their priority list.


Why would someone at google ever use sqlite?


Why wouldn't they? Are you implying that, over the course of decades of Google's existence and thousands of software projects, not once has there ever had the need for a lightweight SQL store that can be embedded with a server or CLI tool?

Your comment truly does SQLite a disservice. SQLite is probably one of the most impressive pieces of software to have ever graced this earth.


Google's practice is that every service they build is built that way that it can scale to millions of users. On servers i don't think they would use sqlite unlike in android. If i build stuff i usually start with sqlite.


It's much more that servers are ephemeral, so the DBs are as a service from another team.

Would you run sqlite in kubernetes? (if so... whyyyyyyy?)


Chrome and Android make heavy use of SQLite. Not that Golang is very relevant to those projects




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

Search: