Miguel Vilá

Second week at RC

Aug 27 2016
Tags: ny, rc

Here’s my second week report:

What was supposed to be just a side project, the small and silly implementation of actors in C, has consumed most of my time. Some of the things I’ve been doing with it:

On Monday I attended Emil Sit’s talk on distributed systems. It didn’t focus on the “theoretical” aspects of distributed systems like consensus or the CAP theorem. Instead, he talked about more practical things like monitoring, logging, control and testing, which I think is more useful.

A fellow recurser has been doing an IRC server in Rust as a means to learn the language. So, lacking any imagination, I decided to do exactly the same thing. A problem we encountered is how to make safe concurrent modifications in Rust. As it turns out Rust’s type system was able to detect the race condition that arises when trying to modify the same data from multiple threads. So the solution we found, thanks to the help of another recurser more acquainted with Rust, is two-fold:

Also with respect to Rust I’ve noted that an unexpected benefit of my C experiments is that now I may understand better the why of Rust’s ownership and borrowing system. The cool thing about Rust is that it’s a modern language that enforces safe memory usage. I’m very curious to see what you can do with it.

And finally on what it’s supposed to be my main project I didn’t advance much. I re-read the leader election part of the raft paper and I think I understand it better now. It looks like learning two things (Raft and Rust) at the same time in order to build something doesn’t sound like a good idea. Instead I think I’ll use a language I know better: Scala. Right now I can even visualize how some of the code will look like in Scala, which is a something I can’t do with Rust at the moment.

On other news:

My main objective for next week will be to organize better my time. I will try to really start on the Raft project, pair-program with more people and do some algorithm problems.