Better HN
topnewbestaskshowjobs
Log inSign up

baotiao

325 karma · joined Apr 29, 2012 (14y ago) · 41 submissions

Perform in distributed database field A Senior Staff Engineer in Alibaba Cloud
Submissions

1.

AliSQL 8.0.44-2: DuckDB, VIDX, Native Flashback, and Transaction Optimizations(p1p1bear.github.io ↗)

1 points · by baotiao · 4mo ago · discuss

comment 9mo ago · link · parent

In 2026, Can AI Modify Database Kernel Code? Rewriting PostgreSQL with Claude Code: Full Page Write vs Doublewrite Buffer, a 3x Performance Gap

comment 9mo ago · link · parent

Yes, MySQL-DuckDB columned read only node will continuously get data from transactional workload by binlog. Then people will not need to maintain tools like kafka/debezium to sync between two node.

comment 9mo ago · link · parent

I’m quite certain that if DuckDB had been open-sourced and reached stability around 2020, TiDB would have definitely chosen DuckDB instead of ClickHouse.

comment 9mo ago · link · parent

We havn't try that before, maybe I will try to combine with mysql-operator later..

comment 9mo ago · link · parent

Actually, that’s not the case. I also support PostgreSQL products in my professional work. However, specifically regarding this issue—as I mentioned in my article—it is simply easier to integrate DuckDB by leveraging MySQL's binlog and its pluggable storage engine architecture.

7.

Why MySQL's Integration with DuckDB Is More Elegant Than PostgreSQL's(linkedin.com ↗)

1 points · by baotiao · 9mo ago · discuss

comment 9mo ago · link · parent

Here is the professional English translation of your analysis, optimized for a technical audience or a blog post:

Why I Believe MySQL is More Suited than PostgreSQL for DuckDB Integration Currently, there are three mainstream solutions in the ecosystem: pg_duckdb, pg_mooncake, and pg_lake. However, they face several critical hurdles. First, PostgreSQL's logical replication is not mature enough—falling far behind the robustness of its physical replication—making it difficult to reliably connect a PG primary node to a DuckDB read-only replica via logical streams.

Furthermore, PostgreSQL lacks a truly mature pluggable storage engine architecture. While it provides the Table Access Method as an interface, it does not offer standardized support for primary-replica replication or Crash Recovery at the interface level. This makes it challenging to guarantee data consistency in many production scenarios.

MySQL, however, solves these issues elegantly:

Native Pluggable Architecture: MySQL was born with a pluggable storage engine design. Historically, MySQL pivoted from MyISAM to InnoDB as the default engine specifically to leverage InnoDB's row-level MVCC. While previous columnar attempts like InfoBright existed, they didn't reach mass adoption. Adding DuckDB as a native columnar engine in MySQL is a natural progression. It eliminates the need for "workaround" architectures seen in PostgreSQL, where data must first be written to a row-store before being converted into a columnar format.

The Power of the Binlog Ecosystem: MySQL’s "dual-log" mechanism (Binlog and Redo Log) is a double-edged sword; while it impacts raw write performance, the Binlog provides unparalleled support for the broader data ecosystem. By providing a clean stream of data changes, it facilitates seamless replication to downstream systems. This is precisely why OLAP solutions like ClickHouse, StarRocks, and SelectDB have flourished within the MySQL ecosystem.

Seamless HTAP Integration: When using DuckDB as a MySQL storage engine, the Binlog ecosystem remains fully compatible and intact. This allows the system to function as a data warehouse node that can still "egress" its own Binlog. In an HTAP (Hybrid Transactional/Analytical Processing) scenario, a primary MySQL node using InnoDB can stream Binlog directly to a downstream MySQL node using the DuckDB engine, achieving a perfectly compatible and fluid data pipeline.

comment 9mo ago · link · parent

On this page, we introduce how to implement a read-only Columnar Store (DuckDB) node leveraging the MySQL binlog mechanism. https://github.com/alibaba/AliSQL/blob/master/wiki/duckdb/du... In this implementation, we have performed extensive optimizations for binlog batch transmission, write operations, and more.

10.

AliSQL: Alibaba's open-source MySQL with vector and DuckDB engines(github.com ↗)

306 points · by baotiao · 9mo ago · 49 comments

comment 3y ago · link · parent

http://baotiao.github.io/

130 blog posts. Writing about Database and Distributed system

comment 3y ago · link · parent

Inside boost::unordered_flat_map

13.

Boost:Unordered_flat_map(bannalia.blogspot.com ↗)

2 points · by baotiao · 3y ago · 1 comment

14.

Coding for SSDs(codecapsule.com ↗)

2 points · by baotiao · 5y ago · 1 comment

15.

Evolution of tree data structures for indexing(erthalion.info ↗)

101 points · by baotiao · 5y ago · 12 comments

comment 8y ago · link · parent

I think the most interesting part is PolarFS taking full advantage of the emerging techniques like RDMA, NVMe, and SPDK. And the Parallel raft consensus algorithm

comment 8y ago · link · parent

Yes I am from the PolarFS team. You can read from the paper that we have compared PolarFS with ceph.

comment 8y ago · link · parent

The protocol is interesting, and we will provide the TLA+ proof soon.

comment 8y ago · link · parent

Thank you. We will provide our TLA+ proof soon..

20.

Optimizing Paxos with batching and pipelining (2012) [pdf](pdfs.semanticscholar.org ↗)

71 points · by baotiao · 8y ago · 1 comment

21.

Fpaxos(fpaxos.github.io ↗)

1 points · by baotiao · 8y ago · discuss

22.

Linearizability-versus-serializability(bailis.org ↗)

1 points · by baotiao · 9y ago · discuss

23.

Consistent hashing with bounded loads(research.googleblog.com ↗)

1 points · by baotiao · 9y ago · discuss

comment 9y ago · link · parent

Yes, exactly.

when you deal with multi threads, not only epoll will cause some problems, but also global variable, memory, etc. global variable solved by mutex, but epoll solved by avoid using it to epoll_wait fds in multi threads.

comment 9y ago · link · parent

I have trid vimium on chrome, vimperator is more configurable, you can change the theme, the suggest, hide the navigation bar...

comment 9y ago · link · parent

I have used vimperator for about 6 years, this is only reason that I still use firefox. It's really amazing.

comment 9y ago · link · parent

It's really awesome.

For a system engineer, it's hard to draw visual csv file by java script. markdown is the most simple and convenient tool, it's a good idea to combine markdown with visualization.

comment 9y ago · link · parent

I think the different between redis and webserver like nginx is that all the operations in redis is almost the same, it is about less than 1ms. However the request to nginx fall in a widely range, some request need 10ms, while some request need 10s. Since nginx need do some file operations.

So the single model work well for redis, but it doesn't work well for nginx, since if there is a request in nginx that is blocking for about 10s, people can't tolerate this situation.

12