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
310
WebSockets - Today, in the Past, in Future and in Production.
bodokaiser
2
160
Other Decks in Programming
See All in Programming
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
540
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
370
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
たのしいparse.y
ydah
3
120
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
770
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
710
CSC305 Lecture 25
javiergs
PRO
0
130
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
Refactor your code - refactor yourself
xosofox
1
260
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1366
200k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Six Lessons from altMBA
skipperchong
27
3.5k
Code Reviewing Like a Champion
maltzj
520
39k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Designing for humans not robots
tammielis
250
25k
Statistics for Hackers
jakevdp
796
220k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
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!