
MIT 6.824 Distributed Systems labs rewritten in Go - myko
http://pdos.csail.mit.edu/6.824/labs/lab-1.html
======
noelh
I'm currently taking the class. C++ was used before. The main reasons the
professor cited for using Go are that it has a very easy to use RPC library
and that the labs are designed so that you will spend most of your time
working on the distributed systems aspects of the problems, not dealing with
the intricacies of the language or libraries used. Apparently he felt Go was
better for that than C++, though he didn't spend any time comparing the two.

~~~
ernestipark
I took 824 last Spring and the labs were often terrible because of the level
of debugging necessary (but very informative and well made). In particular it
was bad for those without much C++ experience like myself. I think the
difficulty of testing and worrying more about small bugs rather than the
concepts of distributed systems was a common complaint and it's awesome to see
it being changed. This class was also taught by rtm the semester I took it.

~~~
stcredzero
"Taught by RTM" == "taught by read the manual"?

~~~
noelh
RTM = Robert Tappan Morris,
<http://en.wikipedia.org/wiki/Robert_Tappan_Morris>

------
jhspaybar
Having been educated only as an undergrad at a college ranked ~100, I have a
question for those who've experienced a course like this at MIT or a similar
institution. When I was reading the first lab's description I thought "man,
that'd be tough to put out in a week, but it's doable." I saw that it appears
to be a multi-week lab for graduate students and wanted to find out if this is
normal difficulty for a course? Is there more homework outside of labs that's
missing, or crazy quizes/tests that deal with much more theory or proof style
work? I just recall my undergrad courses having those extra items, but in
large part being the case that if you made all your labs pass all the test
cases you could get an A in the course. Does this hold true even at the elite
schools or is there much more hidden below the surface here?

~~~
zem
having taken a couple of cs undergrad courses when i was a physics grad
student, i can tell you that undergrads seem to get _way_ more in the way of
homework and assignments than grad students do (presumably because grad
students need to keep up with their research, TA duties, etc.)

~~~
Evbn
It is because grad school "classes" are a charade to keep up the pretense that
an apprenticeship is a classroom education that merits tuition.

------
dweis
CMU's 15-440 Distributed Systems course did this over a year ago. See
<http://www.cs.cmu.edu/~dga/15-440/F12/>

The professor, David Andersen, catalogued his experience on Google Plus:
[https://plus.google.com/115237092509505721130/posts/DKVcPLbq...](https://plus.google.com/115237092509505721130/posts/DKVcPLbqYX8)
[https://plus.google.com/115237092509505721130/posts/AQqe7Xay...](https://plus.google.com/115237092509505721130/posts/AQqe7Xayzjn)
[https://plus.google.com/115237092509505721130/posts/d2RE6gbj...](https://plus.google.com/115237092509505721130/posts/d2RE6gbj4gW)
[https://plus.google.com/115237092509505721130/posts/3PFz3RUe...](https://plus.google.com/115237092509505721130/posts/3PFz3RUeejy)

------
epenn
At CMU, 15-440/640 Distributed Systems is also in Go. One professor does it
exclusively in Go and the other gives you the option of Go, C, C++, or Java.

<http://www.cs.cmu.edu/~dga/15-440/F12/>

------
JoeAcchino
For those wondering where is Go mentioned:
<http://pdos.csail.mit.edu/6.824/schedule.html>

~~~
songgao
Also here: <http://pdos.csail.mit.edu/6.824/labs/lab-1.html>

> You'll implement this lab (and all the labs) in Go.

I'm really glad to see this :-)

~~~
KMag
Go seems pretty good for things I might otherwise prototype in Python and then
rewrite in C++ in order to get better static guarantees and performance. Does
that sound fair?

CSP/Actor concurrency instead of exposing raw threads is a huge win. Focusing
on interfaces instead of ancestry is also a huge win. However, it's really
tough for me to get over Go's treatment of null and global mutable state.

It seems to me a bit of a waste to design a new statically typed language that
intentionally allows the most common type error, as if Tony Hoare's Billion
Dollar Mistake wasn't a mistake. One of the smartest things Bjarne Stroustrup
did was disallow null in C++'s reference semantics.

It also seems a waste to give a language somewhat Erlang-like CSP/Actor-based
concurrency, and then allow direct mutation of global state. This makes it
much easier to introduce concurrency bugs, and also hurts garbage collector
performance.

Maybe I just tried out Go too early. Does Go still use the Plan9 ABI and come
with a copy of kenc so you can recompile your C source to be linkable against
your Go code? Are the language creators still the only ones allowed to create
generics?

~~~
icebraining
Yes and yes. Though you don't need to manually do anything (dunno if you ever
did), it still comes with the Plan 9 C compiler for bridging Go with C, and
generics are still hardcoded.

------
jzelinskie
Can this course be taken/audited online? My degree has a distributed course,
but there isn't even a mention of anything like Paxos.

~~~
chubot
Where do you see Paxos? This looks like something simpler. It pretty much has
to be as implementing Paxos would be too hard for a class exercise. I don't
think it makes sense to do Paxos with 2 servers.

~~~
noelh
It appears that Paxos will be used in the third lab,
<http://pdos.csail.mit.edu/6.824/labs/lab-3.html>.

~~~
jeremyis
In the 2010 version of this course, we implemented paxos on one of the later
labs. It was considered one of the hardest I think.

~~~
Evbn
How is Paxos hard? Inventing Paxos is hard. Implementing it is implementing a
well-specified state machine.

~~~
rsc
If it was so easy papers like this would not exist:
<http://research.google.com/archive/paxos_made_live.html>

------
rmoriz
Can we get more details? What did they use before? C++? Is there any code
opensourced?

~~~
songgao
Check their site for 2012. It was C++. :-)

