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
54
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
390
WebSockets - Today, in the Past, in Future and in Production.
bodokaiser
2
180
Other Decks in Programming
See All in Programming
Fluid Templating in TYPO3 14
s2b
0
130
Package Management Learnings from Homebrew
mikemcquaid
0
200
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
Architectural Extensions
denyspoltorak
0
270
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
510
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
540
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
20
6.8k
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
140
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.9k
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
120
CSC307 Lecture 03
javiergs
PRO
1
490
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
Featured
See All Featured
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
430
Paper Plane (Part 1)
katiecoart
PRO
0
4k
We Have a Design System, Now What?
morganepeng
54
8k
We Are The Robots
honzajavorek
0
160
Designing for humans not robots
tammielis
254
26k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Facilitating Awesome Meetings
lara
57
6.7k
My Coaching Mixtape
mlcsv
0
46
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!