simple katas for golang
$ go get -u github.com/streadway/handy/breaker
$ go get -u github.com/gin-gonic/gin
A quick introduction to the language.
Goal: First taste of golang packages, goroutines and channels.
Build an http service with not good enough performance and high error rate.
Goal: Introduction to http services
Adapt the simple parser so it takes the XML to unmarshall from the flaky http service.
Goal: Basic knowledge of native http package
Expose the results of the parsing process in another http service.
Goal: Explore the language features for concurrency
Distribute the load across multiple backends and use the fastest one to serve the response
Goal: Build subscribers, generators and timeouts with goroutines and channels
Create a balancer in order to encapsulate the distribution of the load against the backend services
Goal: Encapsulate the components in structs. Goroutine reutilization.
After a quick profiling of the proxy, we can see it has too many channels, so it should be fixed
Goal: Share channels between multiple goroutines
What will happen if a backend goes down? How could it be addressed?
Goal: Abstract the membership from the balancing strategy and add a very simple backoff strategy
Add a new endpoint to the proxy service so the backends could register themselves to the proxies
Goal: Be able to adapt the number of goroutines depending on the cluster status
Extend the simple client so it registers itself periodically to the proxy
Goal: Create a simple scheduled task
Move to a more 'production-ready' environment, without all those custom components
Goal: Play with some microservice-oriented components and libs
The slides
folder contains several go presentations with a complete explanation of the katas
Run them with the native present
tool
$ cd slides
$ present
2016/10/01 11:48:29 Open your web browser and visit http://127.0.0.1:3999