Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Go - A great language for building web applicat...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
sporto
September 06, 2013
350
1
Share
Go - A great language for building web applications
sporto
September 06, 2013
More Decks by sporto
See All by sporto
React inside Elm
sporto
2
200
Elm
sporto
1
290
Redux: Flux Reduced
sporto
1
380
Practically Immutable
sporto
0
210
Webpack and React
sporto
4
400
Rails with Webpack
sporto
1
240
Lesson learnt building Single Page Application
sporto
0
140
Grunt
sporto
1
210
Safe Testing in Ruby
sporto
1
140
Featured
See All Featured
Google's AI Overviews - The New Search
badams
0
1k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Marketing to machines
jonoalderson
1
5.3k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Skip the Path - Find Your Career Trail
mkilby
1
130
Code Review Best Practice
trishagee
74
20k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
240
How to build a perfect <img>
jonoalderson
1
5.5k
Mind Mapping
helmedeiros
PRO
1
220
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
150
Speed Design
sergeychernyshev
33
1.8k
Transcript
Go Why use it for building web application? @sebasporto
Comparing it to languages I use and love Ruby JavaScript
To start with + Lightweight + Relatively easy to learn
+ Familiar
It is fast
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
It is fast! 190x faster than Ruby
Concurrency as core feature
Concurrency - Parallel requests
None
Concurrency - Parallel requests Ruby Mutex and Threads :( EventMachine
:(
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);
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)
Efficient memory usage
# 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
Rich standard library + Http + Templating + JSON
Static typing (+ IMO) + More robust + Easier to
refactor + Less tests + Compiler can go crazy with optimisations + Still flexible (with interfaces) + No ceremony
Compiled But ultra fast
Single binary + Compile and deploy + No need to
worry about dependencies, e.g. NPM modules, RubyGems
A lot more + Simple and flexible object system -
composition + Functions as first class + Closures + Standard formating of source code
It is great alternative Try it!
Thanks @sebasporto