TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Protobuf as a Database Wire Protocol?

1 点作者 fearthetelomere超过 4 年前
Why is Protobuf a bad choice for a distributed database wire protocol?<p>I understand it&#x27;s a popular choice for service development through the use gRPC, Twirp, etc. I assume there are good performance reasons why Protobuf is not used in database node-to-node communication, but I&#x27;m curious to know what they are.<p>As an aside, if I don&#x27;t want to commit to one protocol like Postgres or MySQL or Memcached, is there an extensible wire protocol out there that can accommodate these different protocols under one umbrella? I&#x27;m considering generically pre-pending each frame with a set of bits to identify which protocol the frame uses. This seems like something that&#x27;s probably already been solved, and I&#x27;m just not aware of it. Does anyone have any ideas?

2 条评论

aq9超过 4 年前
So, a lot would depend on what you plan on passing the protobufs over. Plain TCP? gRPC? gRPC kinda sucks for this, the serialization&#x2F;deserialization can be moderately expensive (CPU); and gRPC&#x27;s multiplexing of multiple flows onto the same connection can be hard to reason about (i.e. debug); and the performance characteristics are not great either.
评论 #26108960 未加载
kstenerud超过 4 年前
Have a look at Apache Arrow<p><a href="https:&#x2F;&#x2F;arrow.apache.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;arrow.apache.org&#x2F;</a>