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
220
WebSockets - Today, in the Past, in Future and in Production.
bodokaiser
2
160
Other Decks in Programming
See All in Programming
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
170
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
try! Swift Tokyo 初参加報告LT
hinakko2
0
210
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
660
Java 22 Overview
kishida
1
180
Ruby Function Composition
bkuhlmann
1
330
VSCodeでのDatabricks開発もお勧めしたい/I would also recommend Databricks development with VSCode.
kazumain
0
250
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
130
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
790
try! Swift Tokyo 2024のLT枠に採択されたプロポーザルを出すときに考えていたこと
ski
0
350
Goのエラースタックトレースの歴史と今後
sonatard
6
420
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
140
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
41
12k
Facilitating Awesome Meetings
lara
41
5.6k
Why Our Code Smells
bkeepers
PRO
331
56k
We Have a Design System, Now What?
morganepeng
42
6.7k
Building Adaptive Systems
keathley
30
1.9k
Into the Great Unknown - MozCon
thekraken
10
990
Happy Clients
brianwarren
91
6.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
647
58k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
1
3.4k
Being A Developer After 40
akosma
56
580k
The Mythical Team-Month
searls
215
42k
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!