2. 1972
(or 2008)
FIRST COMMIT
WHAT ABOUT GO?
Open-source & built by Google.
“Go is an open source programming
language that makes it easy to build
simple, reliable, and efficient
software.”
GO
RE-WRITTEN IN GO
4. WHY THEY USE IT?
SIMPLE, POWERFUL & COMPLETE
➔ Looks like C but way more simple
➔ Some really great core packages included
➔ A complete documentation of all packages
with godoc.org
➔ Build your application for all platforms
➔ High performances
CONCURRENCY
➔ Goroutines are easy to use to run something
in another thread (just prefix with go)
➔ Channels are here to help you synchronizing
data between Goroutines
5. WHAT IS CONCURRENCY?
APPLICATION
GOROUTINE #1
GOROUTINE #2
GOROUTINE #3
GOROUTINE #n
GOROUTINE #2 - 1
GOROUTINE #2 - 2
You can run unlimited goroutines, depending of your available resources.
You can run a goroutine from another goroutine (inception).
7. WHAT ARE WE BUILDING?
WORKMQ - A WORKER SERVICE
We will write ~290 lines of code that will allow to:
➔ Publish data over UDP protocol
➔ Multiple workers handling these data in concurrency (Goroutines)
➔ Synchronize data between these workers (Channels)
➔ Create a HTTP server to expose statistics information (number of
messages remaining, how many messages sent and processes by second
and by queue, …)
WORKMQ
SERVER
SENDER
CLIENT
UDP HTTP