TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A MySQL compatible database engine written in pure Go

405 pointsby mliezunabout 1 year ago

23 comments

zachmuabout 1 year ago
Hi, this is my project :)<p>For us this package is most important as the query engine that powers Dolt:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;dolthub&#x2F;dolt">https:&#x2F;&#x2F;github.com&#x2F;dolthub&#x2F;dolt</a><p>We aren&#x27;t the original authors but have contributed the vast majority of its code at this point. Here&#x27;s the origin story if you&#x27;re interested:<p><a href="https:&#x2F;&#x2F;www.dolthub.com&#x2F;blog&#x2F;2020-05-04-adopting-go-mysql-server&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.dolthub.com&#x2F;blog&#x2F;2020-05-04-adopting-go-mysql-se...</a>
评论 #39986720 未加载
评论 #39985149 未加载
评论 #39987110 未加载
jddjabout 1 year ago
I always found the idea behind dolt to be very enticing.<p>Not enticing enough to build a business around, due to it being that bit too different and the persistence layer being that bit too important. But the sort of thing that I&#x27;d love it if the mainstream DBs would adopt.<p>I didn&#x27;t realise the engine was written in Go, and honestly the first place my mind wonders is to performance.
评论 #39984319 未加载
评论 #39984318 未加载
评论 #39984774 未加载
jbverschoorabout 1 year ago
This seems to be a wire-protocol proxy for mysql -&gt; SQL.<p>The default proxied database is dolt. I&#x27;m guessing this is extracted from dolt itself as that claims to be wire-compatible with mysql. Which all makes total sense.
评论 #39984397 未加载
pizza234about 1 year ago
The compatibility (and functionality in general) is severely limited, not usable in production:<p>&gt; No transaction support. Statements like START TRANSACTION, ROLLBACK, and COMMIT are no-ops.<p>&gt; Non-performant index implementation. Indexed lookups and joins perform full table scans on the underlying tables.<p>I actually wonder if they support triggers, stored procedures etc.
评论 #39984343 未加载
评论 #39984244 未加载
评论 #39985145 未加载
osigurdsonabout 1 year ago
I suspect Go is probably better, but as a long time C# developer I cringe at the idea of implementing a DB with GC language. It seems that you would be fighting the GC all the time and have to write lots a lot of non-obvious low allocation code, using unmanaged structures, unsafe, etc., a lot. All doable of course, but seems like it would be starting on the wrong foot. Maybe fine for a very small team, but onboarding new devs with the right skill set would be hard.
评论 #39989464 未加载
评论 #39989570 未加载
评论 #39986144 未加载
评论 #39986210 未加载
评论 #39994606 未加载
评论 #39988495 未加载
评论 #39986485 未加载
TechTechTechabout 1 year ago
It would be great if this evolves to support mysql to postgresql and mysql to sqlite.<p>Then we can finally have multiple database engine support for WordPress and others.
评论 #39988456 未加载
didipabout 1 year ago
tidb has been around for a while, it is distributed, written in Go and Rust, and MySQL compatible. <a href="https:&#x2F;&#x2F;github.com&#x2F;pingcap&#x2F;tidb">https:&#x2F;&#x2F;github.com&#x2F;pingcap&#x2F;tidb</a><p>Somewhat relatedly, StarRocks is also MySQL compatible, written in Java and C++, but it&#x27;s tackling OLAP use-cases. <a href="https:&#x2F;&#x2F;github.com&#x2F;StarRocks&#x2F;starrocks">https:&#x2F;&#x2F;github.com&#x2F;StarRocks&#x2F;starrocks</a><p>But maybe this project is tackling a different angle. Vitess MySQL library is kind of hard to use. Maybe this can be used to build ORM-like abstraction layer?
评论 #39984514 未加载
评论 #39985150 未加载
fedxcabout 1 year ago
I always look at these implementations and go wow! But then I think, is there any real use for this?
评论 #39985829 未加载
评论 #39985815 未加载
评论 #39988485 未加载
west0nabout 1 year ago
Interesting, another project implemented in Go that is compatible with MySQL server, alongside others like Vitess and TiDB.
malkiaabout 1 year ago
Is this for integration&#x2F;smoke testing?
评论 #39984689 未加载
speledingabout 1 year ago
How hard would it be to use this as an in-memory replacement for MySQL for testing, let&#x27;s say, a Rails project?<p>Given how important the DB layer is I would be careful to use something like this in production, but if it allows speeding up the test suite it could be really interesting.
maxlohabout 1 year ago
I know it is a matter of choice, but why was MySQL chosen instead of PostgreSQL? The latter seems to be more popular on Hacker News.
评论 #39984615 未加载
评论 #39984626 未加载
taf2about 1 year ago
Could this be used as kind of connection proxy to allow for more clients to a single pool of database servers?
neximo64about 1 year ago
Is there anything like this for postgres?
评论 #39984263 未加载
hwbunnyabout 1 year ago
What&#x27;s the purpose of this idea? Snapshotted mysql server? Who uses that and for what purpose?
davgoldinabout 1 year ago
Congrats, looks like a lot of hard work!<p>Could I swap storage engine with own key value storage e.g. rocksdb or similar?
评论 #39990727 未加载
karmakazeabout 1 year ago
Compatible has many aspects. I&#x27;d be interested in the replication protocols.
geenatabout 1 year ago
With Vitess likely consolidating its runtimes (vtgate, vtctl, vttablet, etc) into a single unified binary: <a href="https:&#x2F;&#x2F;github.com&#x2F;vitessio&#x2F;vitess&#x2F;issues&#x2F;7471#issuecomment-2035406575">https:&#x2F;&#x2F;github.com&#x2F;vitessio&#x2F;vitess&#x2F;issues&#x2F;7471#issuecomment-...</a><p>... it would be a wild future if Vitess replaced the underlying MySQL engine with this (assuming the performance is good enough for Vitess).
评论 #39985518 未加载
cevingabout 1 year ago
Why not standard conforming SQL instead of MySQL?
kamikaz1kabout 1 year ago
shouldn&#x27;t these projects have a perf comparison table? there was a post a couple days ago about the an in-memory Postgres, but same problem on the perf.<p>if someone is considering running it, they&#x27;re probably considering it against the actual thing. and I would think the main decision criteria is: _how much faster tho?_
评论 #39984451 未加载
sgammonabout 1 year ago
Isn&#x27;t that........ Vitess?
评论 #39984406 未加载
cvalkaabout 1 year ago
TiDB!
ameliusabout 1 year ago
Performance comparison against the original?