text stringlengths 0 1.49k |
|---|
**Travis Jeffery:** Yeah, pretty much just me at this point. I've gotten a few commits from someone else... I'm nearly feature-complete; the thing I've been working on right now is replication, which I think I've got working... I basically have to do a little bit more testing from there, and then the next thing is cons... |
I haven't started on the performance testing yet, so we'll see how that goes. It should be pretty similar, because basically the limitation is gonna be your disk, because it uses the same sort of algorithms and the same design. |
One thing that Go is missing from Java is called zero-copy networking. That's basically where the sockets will be connected together. The socket from the network will be connected to the disk socket, and it will bypass the kernel. That's one thing that Java has on Go. Some people have started implementing some librarie... |
**Erik St. Martin:** Oh, interesting. And all of those come from just running up against it; most code people will write don't need stuff like that, so as it's come up against. |
**Brian Ketelsen:** Didn't the protocol change recently not to require Zookeeper? Won't that make your life a little bit easier? |
**Travis Jeffery:** Yeah, exactly, that's why I can even do this, basically, as I won't need it. All the consumers, they will be built into Kafka, it will be in the data that Kafka uses consensus to spread around the brokers. The state will be stored on the brokers themselves. |
**Brian Ketelsen:** That's awesome. I was reading your blog post on how you implemented the storage layer and found it fascinating; that's really cool. Can you tell us a little bit more about the internals of storage and how you mapped it from Java to Go? |
**Travis Jeffery:** Basically, the way I went about it is I cloned the Kafka repo and then I got the big picture view of the pieces. So I'd look at the directories and I'd look at the files, and then I dug into those... They have like a log directory. I looked at those files in there and I figured out how they worked a... |
\[12:03\] They kind of described in a high level how it worked, and then from there I just went in and implemented it. So I basically just learned enough Scala as I needed to understand what was going on, and then just did it. |
**Brian Ketelsen:** Nice. So you're not using any intermediate storage mechanism like BoltDB or LevelDB - you're using all stuff that you wrote yourself? |
**Travis Jeffery:** Yeah, so for the storage internals... Yeah, because it would just be way to slow to use BoltDB. |
**Erik St. Martin:** Now, Kafka does a log-structured merge tree, right? And assets tables like Cassandra does? Or is the underlying storage layer different? I didn't read the same post Brian did. |
**Travis Jeffery:** Kafka does a lot of work on the clients, and this is how they get a lot of their performance. Basically, the Kafka clients will encode the data according to Kafka's protocol, and then that same format basically goes directly to disk on the Kafka server. That's one way it gets all this performance - ... |
They maintain an offset -- same thing with Jocko... I maintain an offset and the log where the next bytes will go, and then the offsets for those logs are mapped by an index file, and the index file basically maps log offsets to the byte position in the log file. So when Kafka goes to look up a log entry, it will take ... |
**Brian Ketelsen:** Kind of impressive how it's architected to be that fast. |
**Travis Jeffery:** True, that's another reason why I wanted to do this project... Because I knew that was a big part of what made Kafka special, and I wanted to understand it to the point where I could create it. So that was another reason why I made Jocko. |
**Brian Ketelsen:** That blog post is really good, we'll put the link to it in the show notes, for the storage engine. I really enjoyed reading it. |
**Erik St. Martin:** So in the development of this, have you run up against anything aside from the kernel-level stuff you were talking about, or has it mostly been straightforward to implement this in Go? |
**Travis Jeffery:** It hasn't been too bad... One of my favorite things about Go is that bytes are everywhere. You have the io.Writer and the io.Reader... So it's been pretty awesome actually, because again, with Kafka and how it networks by basically sending you the data in byte form and you're just putting that to di... |
There hasn't been too much trouble... And again, another nice thing is that the clients have to do so much work, so that also helps in terms of the work they have to do when you're implementing the Kafka. So most of the work has been around doing consensus and service discovery. |
**Erik St. Martin:** Right, right. |
**Brian Ketelsen:** Now, I noticed you used Hashicorp's Raft and Serf for your discovery and consensus... Did you do any benchmarks on the different Raft protocols before you chose that one? Is there a particular reason you chose it, or you just pulled one out of a hat? |
**Travis Jeffery:** I looked at that one and I looked at the Etcd as well. I felt like Hashicorp's just fit my brain a little bit better. It seemed a little bit simpler. The other thing is that I just like how it's in its own repo, too. Because when I wanna look up issues for the project, I just wanna see the issues fo... |
\[15:55\] With Etcd, they have their Raft library inside this huge -- that's just one small part of their huge project and huge repo on GitHub, so it's difficult to find issues for Raft, that are Raft-specific, so that's another thing that was annoying for me. So yeah, it was mostly that it fit my brain. |
The other nice thing was that I read Consul and Nomad - I read their source code to see how they did it, so it was nice to see the same libraries. So that was another thing, it was useful to see how they did it. |
**Brian Ketelsen:** That's nice. |
**Travis Jeffery:** Yeah, Consul and Nomad - they were really useful because they both used Serf and Raft in their libraries that they made, so they were good examples. |
**Erik St. Martin:** Alright, so I think it's about time for our first sponsored break. |
**Break:** \[16:43\] |
**Erik St. Martin:** We are back, we are talking to Travis Jeffery about Jocko, and let's start talking about some interesting Go projects and news. Anybody got anything interesting they've come across this week? |
**Brian Ketelsen:** It's been a big week, I'm not gonna lie. It's been a big week. |
**Erik St. Martin:** How big? |
**Brian Ketelsen:** Epic, huge. It's YUUGE. It's bigger than my tiny orange hands, that's how big it is. \[laughter\] It's YUUGE. So today Google released an app called Shenzhen Go, and it's a way to graphically wire up goroutines and channels so you can design the flow of your concurrency and your data flow graphicall... |
It's very alpha level, and I think it doesn't do two-way synchronization, so you can only update from the graph to code and not reverse direction, but it looks really promising. I haven't tried it yet, but it's pretty impressive, the ability to generate Go code from something like a vis-graph. It's cool. |
**Erik St. Martin:** I haven't played with it, but this is the... The Go Shenzhen thing, right? |
**Brian Ketelsen:** Yup. |
**Erik St. Martin:** Yeah, I haven't played with that yet. |
**Travis Jeffery:** Yeah, that's pretty cool, it looks pretty awesome. It's actually funny because I just found another project that's called Go-Call-Vis - it lets you visualize your call graph of your Go program using dot format. |
**Brian Ketelsen:** I saw that yesterday. |
**Travis Jeffery:** Yeah, so that's kind of funny that they came out so close together. But that looks kind of cool, too. It gives you a visual overview of your function calls in your program, and the relations and stuff like that. |
**Erik St. Martin:** See, there's too many new cool projects that come out, and not enough time to even discover them, much less play with them. One of them that I ran across and I saw it was actually mentioned in the Go Weekly Newsletter too - kind of stealing my thunder - is called Subgraph, and it's supposed to be a... |
Somewhere I saw that they were using a whole bunch of Go, and I know that on their site they mention they use it for its memory safety, and I wanted to look into that more and see specifically what components they're using it for. I'd like to actually reach out to them and see if whether this is kind of different appli... |
**Brian Ketelsen:** Right, we've gotta get them on the show. |
**Erik St. Martin:** Yeah, we just gotta remember to put them on the list. |
**Brian Ketelsen:** The list is getting long. |
**Erik St. Martin:** \[20:14\] During the show we're like, "We should totally get that person on the show", and then we forget. How about you, Carlisia? Did you run across anything this week that you found interesting? |
**Carlisia Thompson:** Yes, I was talking to my co-worker Joshua and asking him if he had used any queuing system, because from the Rails world there are two very well-established libraries -- well, I should say Gem... And I haven't used anything like that in Go yet, but I might have to. He mentioned this library that ... |
**Brian Ketelsen:** I saw Cherami and I haven't brought it up on the show yet because their documentation is empty at this point. Although they had a big blog post announcing it on 6th December, they haven't really published any docs yet, and it just seems unfair to tease people with something that exciting without hav... |
**Erik St. Martin:** It's interesting though, because from a high level, on the page that Carlisia linked, it does look a lot like Kafka. You have producers producing to a topic - they call it a queue here, but then there's consumer groups to consume from it. So from a really high level, it does have a very Kafka-ish w... |
**Brian Ketelsen:** Yeah, and they do have durability with RocksDB underneath, so maybe that's the law of the biggest differentiator. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.