Hello, gopher. Well, if you are not a gopher and want to become one, hello too. I propose to combine two things in this codelab: to learn Go, as a programming language, and, maybe, to learn a couple of new things for yourself.
You will need the following:
- Installed Go Programming Language
- Configured
GOPATH
(For 1.8 not relevant) - You are familiar with basic things in Go. “Go” tour can help you with this
This laboratory work has two purposes:
- Get an experience in Go
- Learn how does the key-value of the repository work (redis, memcached)
- How some indexes work.
Eventually, the database will be able to do the following things:
- Quick search by the key;
- Search for places near you;
- HTTP interface to the database;
- LRU / expire mechanisms for data storage;
By Go you will get the following knowledge:
- How does concurrency work;
- Work with basic syntactic things;
- Test experience in go;
- Basic things with Makefile;
The workshop contains these steps
- Step 0. Setting of the problem
- Step 1. What you need to know about testing and writing tests in Go.
- Step 2. Hello world
- Step 3: Design the HTTP API
- Step 4. Make the HTTP API
- Step 5. Split main.go into several packages
- Step 6. Makefile, configuration and flags
- Step 7. Add a data warehouse and look for the nearest drivers in a naive way
- Step 8. Writing the first benchmark: why do we need it
- Step 9. What is R-tree and why is it more effective than naive implementation?
- Step 10. Implement the LRU (Part 1)
- Step 11. Implement the LRU (Part 2)
- Step 12: Making the repository consistent. Introducing the LRU
- Step 13: Implement the repository in the API
- Step 14. You have completed the course. Congratulations
There are several places where you can find information about Go:
- golang.org
- godoc.org here you can find the documentation for any package
- Go language blog
One of the most remarkable qualities of Go is its community.
- @bishkekgophers - Bishkek Gophers
- @devkg - Developers of Kyrgyzstan
- @maddevsio - The channel of our company, where we share all kinds of interesting things. We often speak about Go
- golang-ru.slack.com - The Russian-speaking community of gophers
- gophers.slack.com - The English-speaking community of gophers. Invitation to get here https://invite.slack.golangbridge.org/
- GolangShow - Russian-language podcast about Go-language
- Gotime - English-language podcast about Go-language
- Go Forum
- @golang and #golang on Twitter.
- Go+ community on Google Plus.
- Francesc Campoy for his workshop Building Web Applications with Go
- Ashley McNamara for the picture in the 10th step. You can see other works in repo
- Elena Grahovac for the review and feedback