Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Go - A great language for building web applicat...
Search
sporto
September 06, 2013
1
340
Go - A great language for building web applications
sporto
September 06, 2013
Tweet
Share
More Decks by sporto
See All by sporto
React inside Elm
sporto
2
180
Elm
sporto
1
260
Redux: Flux Reduced
sporto
1
350
Practically Immutable
sporto
0
190
Webpack and React
sporto
4
390
Rails with Webpack
sporto
1
220
Lesson learnt building Single Page Application
sporto
0
130
Grunt
sporto
1
190
Safe Testing in Ruby
sporto
1
130
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
310
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
250
Scaling GitHub
holman
464
140k
RailsConf 2023
tenderlove
30
1.3k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
60
37k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
2
2.7k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
390
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
120
Game over? The fight for quality and originality in the time of robots
wayneb77
1
58
Raft: Consensus for Rubyists
vanstee
141
7.2k
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