Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Go - A great language for building web applicat...
Search
sporto
September 06, 2013
370
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
210
Elm
sporto
1
300
Redux: Flux Reduced
sporto
1
390
Practically Immutable
sporto
0
220
Webpack and React
sporto
4
420
Rails with Webpack
sporto
1
260
Lesson learnt building Single Page Application
sporto
0
160
Grunt
sporto
1
220
Safe Testing in Ruby
sporto
1
160
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
Making the Leap to Tech Lead
cromwellryan
135
10k
Mind Mapping
helmedeiros
1
400
New Earth Scene 8
popppiees
4
2.7k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
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