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
170
Other Decks in Programming
See All in Programming
生成AI時代のコンポーネントライブラリの作り方
touyou
1
170
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
120
Goで作る、開発・CI環境
sin392
0
220
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
2
150
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
730
Hypervel - A Coroutine Framework for Laravel Artisans
albertcht
1
110
Quand Symfony, ApiPlatform, OpenAI et LangChain s'allient pour exploiter vos PDF : de la théorie à la production…
ahmedbhs123
0
150
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
700
効率的な開発手段として VRTを活用する
ishkawa
0
130
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
260
WebViewの現在地 - SwiftUI時代のWebKit - / The Current State Of WebView
marcy731
0
110
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
160
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
950
A Modern Web Designer's Workflow
chriscoyier
694
190k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
The Invisible Side of Design
smashingmag
301
51k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
A designer walks into a library…
pauljervisheath
207
24k
Making Projects Easy
brettharned
116
6.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
730
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!