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
42
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
290
WebSockets - Today, in the Past, in Future and in Production.
bodokaiser
2
160
Other Decks in Programming
See All in Programming
色々なIaCツールを実際に触って比較してみる
iriikeita
0
130
Vue3の一歩踏み込んだパフォーマンスチューニング2024
hal_spidernight
3
2.9k
Tuning GraphQL on Rails
pyama86
2
780
僕がつくった48個のWebサービス達
yusukebe
17
16k
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
530
Server Driven Compose With Firebase
skydoves
0
350
Honoの来た道とこれから
yusukebe
19
3k
役立つログに取り組もう
irof
24
7.7k
WEBエンジニア向けAI活用入門
sutetotanuki
0
290
RailsのPull requestsのレビューの時に私が考えていること
yahonda
4
1.5k
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
1
240
#pixiv小説画像メーカー はこうしてできた / The Making of the pixiv Novel Image Maker
roiban
0
220
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
328
21k
Become a Pro
speakerdeck
PRO
24
4.9k
Adopting Sorbet at Scale
ufuk
73
9k
Building Better People: How to give real-time feedback that sticks.
wjessup
363
19k
Scaling GitHub
holman
458
140k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
Docker and Python
trallard
40
3k
Embracing the Ebb and Flow
colly
84
4.4k
Making Projects Easy
brettharned
115
5.9k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
Agile that works and the tools we love
rasmusluckow
327
21k
Building Adaptive Systems
keathley
38
2.2k
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!