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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Creator of Raft Algorithm introduces LogCabin

199 点作者 dencold大约 10 年前

15 条评论

mavelikara大约 10 年前
I have a slightly off-topic question for Diego and other people experienced with distributed systems.<p>Why are consensus algorithms always developed as systems, not as libraries? Zookeeper, etcd and LogCabin all operate as a cluster of processes which other nodes connect to over a client library.<p>I can imagine that the distributed-state-machine-replication-mechanism of Raft or ZAB being implemented as a library where the user has to provide an implementation of the communication layer. Such a library can be used as a starting point for building other more complex systems which aim to provide a low-friction install experience. For example, one good thing about both Cassandra and ElasticSearch is that they both have homogeneous clusters where all nodes play the same role. Incidentally, from what I understand, they both embed a consensus implementation within.<p>Similarly, a membership service (and failure detector) over gossip protocols will also be very useful.<p>An installation guide which starts with &quot;First, install Zookeeper cluster. Then, install a SWARM cluster. Then ...&quot; is not very appealing. That being the case, I wonder <i>why</i> there is no mature OSS library which provides these services. What does HN think about this situation?
评论 #9491167 未加载
评论 #9491336 未加载
评论 #9493731 未加载
评论 #9492276 未加载
评论 #9491168 未加载
评论 #9493451 未加载
评论 #9491149 未加载
misframer大约 10 年前
I&#x27;m not a C++ programmer, and work mainly with Go. I&#x27;m curious to know if it is usual for C++ developers to implement their own event loops for network transports, as Diego has done here [0]. The other example I know is Replicant [1], which is used by HyperDex, and it uses a custom event loop too [2].<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;logcabin&#x2F;logcabin&#x2F;tree&#x2F;master&#x2F;Event" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;logcabin&#x2F;logcabin&#x2F;tree&#x2F;master&#x2F;Event</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;rescrv&#x2F;Replicant" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rescrv&#x2F;Replicant</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;rescrv&#x2F;busybee" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rescrv&#x2F;busybee</a>
评论 #9490814 未加载
评论 #9490833 未加载
评论 #9493308 未加载
windlep大约 10 年前
First thoughts in my head....<p>1) Ah, cool, creator of Raft algo, so some of the &#x27;obvious&#x27; mistakes in an implementation should&#x27;ve been resolved by now (though if ppl weren&#x27;t trying to use it in production.... who knows).<p>2) Great, C++, it should be efficient and fast with consistent RAM usage (Go&#x27;s GC is a bit.... eh... still).<p>3) Oh, you need a C++ client library. :(<p>I would love to say that API&#x27;s don&#x27;t matter, but they do. So, so, so much. If they didn&#x27;t, etcd would never have had a chance against Zookeeper. The Zookeeper folks are looking at adding RESTful API&#x27;s to allow functionality ala-etcd, because its obvious a convenient API is a huge win. Any distributed system solution attempting to gain steam should consider this from the beginning now, as the bar has been set.
评论 #9490828 未加载
rxaxm大约 10 年前
diego, thanks so much for raft! i&#x27;m a student in the brown class you shout out, and i can testify as to its relative simplicity and the clarity with which you guys communicate the ins and outs.<p>i have a question for you, though. why is raft not concerned with byzantine failure? the focus on byzantine fault tolerance from the paxos family of algos (and a lot of the literature&#x2F;educationally material on distributed consensus) makes me feel like it&#x27;s important, but your approach suggests it perhaps isn&#x27;t. do you think this focus is a side-effect of the ubiquity of paxos which is disproportionately concerned with this due to its roots in academia?
评论 #9491136 未加载
siscia大约 10 年前
What is the meaning of such system ?<p>Why do people need something like zookeeper or LogCabin ?<p>How does a coordinator came to play ?<p>I don&#x27;t know much about distribute system, but I would love to learn more...
评论 #9490852 未加载
评论 #9490901 未加载
评论 #9490873 未加载
cperciva大约 10 年前
I always wonder about cute names like this... is LogCabin so named because it&#x27;s HouseBoat minus C? Or is it instead the integral of 1&#x2F;Cabin dCabin?
评论 #9490738 未加载
评论 #9490793 未加载
halayli大约 10 年前
This is a very inefficient way to handle events.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;logcabin&#x2F;logcabin&#x2F;blob&#x2F;master&#x2F;Event&#x2F;Loop.cc#L144-L154" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;logcabin&#x2F;logcabin&#x2F;blob&#x2F;master&#x2F;Event&#x2F;Loop....</a><p>an event can be read&#x2F;write, and each fd:event_type should be able to map to a different Event::file.<p>In its current form, if you receive 2000 events, you&#x27;ll need to unnecessarily context switch 2000 times.
评论 #9491188 未加载
moomin大约 10 年前
Reminder that no system is production ready until aphyr has had time to break it. :)
评论 #9493463 未加载
frankchn大约 10 年前
Nice work! A Curator-like (<a href="http:&#x2F;&#x2F;curator.apache.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;curator.apache.org&#x2F;</a>) framework on top of LogCabin will make it immensely more useful for everyday production systems though.
natch大约 10 年前
What is a coordination service used for?
评论 #9492395 未加载
评论 #9499695 未加载
azinman2大约 10 年前
What the webpage doesn&#x27;t do is explain why I want this over the competitors. That would be helpful.
评论 #9491177 未加载
jbandela1大约 10 年前
Just the other day, I was looking for a raft consensus implementation in C++ and was disappointed at not finding any that were production ready (as opposed to Java and Go). This fits the need perfectly. Also, RamCloud says it requires ZooKeeper. Do you have any idea of the timeframe of when RamCloud will use LogCabin instead.
评论 #9493441 未加载
theossuary大约 10 年前
That video was pretty great, 50:47 made me laugh: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;2dfSOFqOhOU?t=3046" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;2dfSOFqOhOU?t=3046</a> .
0xdeadbeefbabe大约 10 年前
In raft how can a client know it is receiving stale, yet agreed upon, data? I&#x27;m talking about the edge case of having a network partition or some other condition like it.
评论 #9493587 未加载
alexnewman大约 10 年前
Congrats, how does compaction work? I assume you can serve kvs from memory?
评论 #9490913 未加载
评论 #9490900 未加载