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
49
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
360
WebSockets - Today, in the Past, in Future and in Production.
bodokaiser
2
180
Other Decks in Programming
See All in Programming
Kiroで始めるAI-DLC
kaonash
2
630
Platformに“ちょうどいい”責務ってどこ? 関心の熱さにあわせて考える、責務分担のプラクティス
estie
1
140
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
420
Putting The Genie in the Bottle - A Crash Course on running LLMs on Android
iurysza
0
140
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
180
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
ファインディ株式会社におけるMCP活用とサービス開発
starfish719
0
2.1k
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
440
Updates on MLS on Ruby (and maybe more)
sylph01
1
180
AIでLINEスタンプを作ってみた
eycjur
1
230
AI時代のUIはどこへ行く?
yusukebe
18
9.1k
AWS発のAIエディタKiroを使ってみた
iriikeita
1
190
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Building Applications with DynamoDB
mza
96
6.6k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Into the Great Unknown - MozCon
thekraken
40
2k
Building an army of robots
kneath
306
46k
Agile that works and the tools we love
rasmusluckow
330
21k
Scaling GitHub
holman
463
140k
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!