News for hackers. Stuff that matters.
Re:A MySQL compatible database engine written in pure Go by zachmu on Tuesday April 09, 2024 @05:29PM (#39984481)
Hi, this is my project :)

For us this package is most important as the query engine that powers Dolt:

https://github.com/dolthub/dolt

We aren't the original authors but have contributed the vast majority of its code at this point. Here's the origin story if you're interested:

https://www.dolthub.com/blog/2020-05-04-adopting-go-mysql-se...

Re:A MySQL compatible database engine written in pure Go by geenat on Tuesday April 09, 2024 @06:46PM (#39985149)
What's the replication story currently like?
Re:A MySQL compatible database engine written in pure Go by zachmu on Tuesday April 09, 2024 @06:49PM (#39985173)
The vanilla package can replicate to or from MySQL via binlog replication. But since it's memory only, that's probably not what you want. You probably want to supply the library a backend with persistence, not the built-in memory-only one

Dolt can do the same two directions of MySQL binlog replication, and also has its own native replication options:

https://docs.dolthub.com/sql-reference/server/replication

Re:A MySQL compatible database engine written in pure Go by geenat on Tuesday April 09, 2024 @06:55PM (#39985228)
Interesting!

> If you have an existing MySQL or MariaDB server, you can configure Dolt as a read-replica. As the Dolt read-replica consumes data changes from the primary server, it creates Dolt commits, giving you a read-replica with a versioned history of your data changes.

This is really cool.

Re:A MySQL compatible database engine written in pure Go by zachmu on Tuesday April 09, 2024 @07:02PM (#39985269)
Thanks!

Let us know if you try it out, we're always interested in feedback.

https://discord.com/invite/RFwfYpu

Re:A MySQL compatible database engine written in pure Go by timsehn on Tuesday April 09, 2024 @07:06PM (#39985283)
Coming soon we'll have the ability to replicate a branch HEAD to MySQL as well.
Re:A MySQL compatible database engine written in pure Go by dice on Wednesday April 10, 2024 @01:53AM (#39987383)
Have you benchmarked the replication? Or do you know of anyone who's running it against a primary with a couple 10s of thousands of writes per second?
Re:A MySQL compatible database engine written in pure Go by cess11 on Wednesday April 10, 2024 @05:03AM (#39988529)
That's a lot. With Percona clusters I started having issues requiring fine-tuning around a third of that at quite short peak loads, maybe ten minutes sustained high load topping out at 6-10k writes/s. Something like 24 cores, 192 GB RAM on the main node.

Not sure how GC works in Golang but if you see 20k writes/s sustained that's what I'd be nervous about. If every write is 4 kB I think it would be something like a quarter of a TB per hour, probably a full TB at edge due to HTTP overhead, so, yeah, a lot to handle on a single node.

Maybe there are performance tricks I don't know about that makes 20k sustained a breeze, I just know that I had to spend time tuning RAM usage and whatnot for peaks quite a bit earlier and already at that load planned for sharding the traffic.

Re:A MySQL compatible database engine written in pure Go by zachmu on Wednesday April 10, 2024 @09:46AM (#39990692)
I don't think we do have any benchmarks of replication from mySQL, but I am positive there's no chance it can handle 10,000 TPS.
Re:A MySQL compatible database engine written in pure Go by webprofusion on Tuesday April 09, 2024 @11:40PM (#39986720)
This is very cool! Couple of suggestions:

- Don't use "mysql" in the name, this is a trademark of Oracle corporation and they can very easily sue you personally if they want to, especially since you're using it to develop a competing database product. Other products getting away with it doesn't mean they won't set their sights on you. This is just my suggestion and you can ignore it if you want to.

- Postgres wire/sql compatibility. Postgres is for some reason becoming the relational king so implementing some support sooner rather than later increases your projects relevance.

Re:A MySQL compatible database engine written in pure Go by pbronez on Wednesday April 10, 2024 @08:50AM (#39990122)
PostgreSQL support here

https://github.com/dolthub/doltgresql

Background and architecture discussion here

https://dolthub.com/blog/2023-11-01-announcing-doltgresql/

Re:A MySQL compatible database engine written in pure Go by sa-code on Wednesday April 10, 2024 @12:58AM (#39987110)
Missed an opportunity to can this uSql!