Slide 1

Slide 1 text

Go Why use it for building web application? @sebasporto

Slide 2

Slide 2 text

Comparing it to languages I use and love Ruby JavaScript

Slide 3

Slide 3 text

To start with + Lightweight + Relatively easy to learn + Familiar

Slide 4

Slide 4 text

It is fast

Slide 5

Slide 5 text

Bubble sort benchmark #  ruby bubble.call([2,  10,  1,  9,  5,  6,  8,  3,  7,  4]) //  JS bubble([2,  10,  1,  9,  5,  6,  8,  3,  7,  4]); //  Go arr  :=  []int{2,  10,  1,  9,  5,  6,  8,  3,  7,  4} bubble(arr) Code here

Slide 6

Slide 6 text

It is fast! 190x faster than Ruby

Slide 7

Slide 7 text

Concurrency as core feature

Slide 8

Slide 8 text

Concurrency - Parallel requests

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Concurrency - Parallel requests Ruby Mutex and Threads :( EventMachine :(

Slide 11

Slide 11 text

Concurrency - Parallel requests Node.js var  defX  =  Q.defer(); var  defY  =  Q.defer(); var  oneAndTwo  =  Q  .all([defX.promise,  defY.promise])  .then(processConcat);   requestValue('/x',  defX); requestValue('/y',  defY);

Slide 12

Slide 12 text

Concurrency - Parallel requests Go var  cx  chan  string  =  make(chan  string) var  cy  chan  string  =  make(chan  string) go  requestValue("/x",  cx) go  requestValue("/y",  cy) x  :=  <-­‐cx y  :=  <-­‐cy processConcat(x,  y)

Slide 13

Slide 13 text

Efficient memory usage

Slide 14

Slide 14 text

#  Run  benchmark ab  -­‐n  10000  -­‐c  100  http://127.0.0.1:8100/ Node.js FATAL  ERROR:  (...)  process  out  of  memory Go Time  taken  for  tests:      20.689  seconds Complete  requests:            10000 #  No  problems

Slide 15

Slide 15 text

Rich standard library + Http + Templating + JSON

Slide 16

Slide 16 text

Static typing (+ IMO) + More robust + Easier to refactor + Less tests + Compiler can go crazy with optimisations + Still flexible (with interfaces) + No ceremony

Slide 17

Slide 17 text

Compiled But ultra fast

Slide 18

Slide 18 text

Single binary + Compile and deploy + No need to worry about dependencies, e.g. NPM modules, RubyGems

Slide 19

Slide 19 text

A lot more + Simple and flexible object system - composition + Functions as first class + Closures + Standard formating of source code

Slide 20

Slide 20 text

It is great alternative Try it!

Slide 21

Slide 21 text

Thanks @sebasporto