Getting Started

To acquire the skeleton code, run git pull staff master in your personal repo and a new directory hw6 should appear. The portion of the homework will be in hw6/tpc.

Installing grpcio

First, in your VM, install Python gRPC bindings with the following commands:

sudo apt -y update
sudo apt -y install python3-pip
sudo pip3 install grpcio grpcio-tools

Learning Go

The level at which you need to understand go to complete this topic is not very deep. But still, you should know how variable assignment, interfaces, structs, functions, conditionals, etc work. I recommend taking a look at GoByExample to learn syntax. You need to understand at least the following sections:

  • "Hello World" through "Multiple Return Values"

  • "Recursion" - "Channel Buffering"

Professor Culler wrote his own tutorial for learning Go just for this class. It does a very good job of explaining features of the language and I would highly recommend it.

Go Commands

go test -mod vendor <dir>: Runs the unit tests in dir. Leaving the directory empty runs it in the current directory. Replacing the directory with ./... runs it in all sub directories.

gofmt -l -w pkg/: run this in the hw6 directory to format all Go files in the homework. The auto-grader will refuse to run unless your Go files are formatted correctly.

go build -o tpc -mod vendor main.go: Run this command to build the KV store and output as a binary called tpc.

Last updated