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
Stack Problems
Search
Bodo Kaiser
September 16, 2014
Programming
0
48
Stack Problems
Node.js and Google Go and a lot of problems regarding which stack to choose.
Bodo Kaiser
September 16, 2014
Tweet
Share
More Decks by Bodo Kaiser
See All by Bodo Kaiser
The Walking Node
bodokaiser
0
330
WebSockets - Today, in the Past, in Future and in Production.
bodokaiser
2
160
Other Decks in Programming
See All in Programming
昭和の職場からアジャイルの世界へ
kumagoro95
1
380
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1k
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
230
Introduction to kotlinx.rpc
arawn
0
700
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
110
仕様変更に耐えるための"今の"DRY原則を考える / Rethinking the "Don't repeat yourself" for resilience to specification changes
mkmk884
0
160
Spring gRPC について / About Spring gRPC
mackey0225
0
220
負債になりにくいCSSをデザイナとつくるには?
fsubal
9
2.4k
WebDriver BiDiとは何なのか
yotahada3
1
140
Bedrock Agentsレスポンス解析によるAgentのOps
licux
3
840
Linux && Docker 研修/Linux && Docker training
forrep
24
4.5k
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
120
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Six Lessons from altMBA
skipperchong
27
3.6k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
960
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
Why Our Code Smells
bkeepers
PRO
336
57k
The Cult of Friendly URLs
andyhume
78
6.2k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
For a Future-Friendly Web
brad_frost
176
9.5k
Statistics for Hackers
jakevdp
797
220k
Transcript
Stack Problems Node.js Meetup #6, September 16
Let's hear a Story
How I felt first with Node
My Problems with Node Model Validation Business Logic Language Guidance
My Attempts to solve them Mongoose -> SQL SQL ->
Mongoose Mongoose -> Monk & Joi Monk & Joi -> Mongoose Node -> Java Node -> Go Go -> Node
My Attempt to Go III 1. Rewrote REST service 2.
Problems with MongoDB 3. Moved to mysql 4. Moved to mariadb 5. Bloated SQL layer
How I felt after these Failures
Let's write a Web Crawler
... at Web Scale
Basics
In Node I var cache = []; crawl(new Page('http://nodejs.org')); function
crawl(page) { request(page.origin, function(err, res, body) { if (err) return; var $ = cheerio.load(body); $('a').each(function(index, element) { var href = $(element).attr('href'); if (href &amd;&amd; !page.hasRefer(href)) { page.addRefer(href); } }); page.refers.forEach(function(refer) { if (!~cache.indexOf(refer)) {
In Node II
In Go I package main import "github.com/bodokaiser/crawler" func main() {
req, err := crawler.NewRequest("http://golang.org") if err != nil { return } channel := make(chan *crawler.Request) c := crawler.New() c.Do(req) c.Run(100) go wait(request, channel) for req := range channel { for _, url := range req.Refers {
In Go II
It's Rating Time
Where Go is Fun Concurrent Software Custom Software Writing Libraries
Where Node is Fun Rapid Development Responsive Web Apps REST
APIs* * when data consistency does not matter
Conclusion Use the right tool for the right job!