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
Integrating Node.js
Search
Andrew Nesbitt
November 10, 2012
Technology
2
760
Integrating Node.js
Slides from NodejsConf.it talk
Andrew Nesbitt
November 10, 2012
Tweet
Share
More Decks by Andrew Nesbitt
See All by Andrew Nesbitt
Ecosyste.ms Conference talk at EasyBuild User Meeting
andrew
0
120
Can my friends come too?
andrew
5
2.2k
Elasticsearch on Rails
andrew
1
360
24 Pull Requests
andrew
0
500
Hardware Hacking with JavaScript
andrew
1
310
Robotics 101
andrew
4
720
Learning how to Tinker
andrew
2
860
Nodecopter Pivotal
andrew
1
120
BathRuby on Robots
andrew
0
93
Other Decks in Technology
See All in Technology
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
360
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
740
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
1
2.3k
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
820
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
0
110
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
3
420
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.3k
SSMRunbook作成の勘所_20241120
koichiotomo
1
100
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Designing the Hi-DPI Web
ddemaree
280
34k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Typedesign – Prime Four
hannesfritz
40
2.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
4 Signs Your Business is Dying
shpigford
180
21k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Speed Design
sergeychernyshev
24
610
Code Review Best Practice
trishagee
64
17k
Teambox: Starting and Learning
jrom
133
8.8k
Transcript
Integrating Node.js into an existing technology stack
Andrew Nesbitt github.com/andrew @teabass
forwardtechnology.co.uk
None
None
None
Show of hands
Benefits of Node
Legacy Systems
Benefits of integration
Let’s do this!
1. Standalone Tools
Command line tools Asset minification Pixel Trackers Url shorteners Internal
tools Monitoring Chat bots Examples
Legacy App Internal tool Internal tool Internal tool Internal tool
Easy to setup Very little integration Little experience needed Pros
Extra dependencies Knowledge silos Cons
2. Shared databases
Connect directly existing database Read from a data warehouse Share
data with a key-value store Examples
Legacy App DB Node
Quick and dirty Adapters for almost every DB available Slow
databases not a problem Pros
Duplicating domain logic Race-conditions Your DBA will likely hate you
Cons
None
3. Using APIs
Use API from existing application Linkedin Mobile Github Downloads Examples
Legacy App DB Node
Avoid duplication of domain logic JSON APIs are lovely to
work with Plays to Nodes strengths Pros
Extra load on existing application Might have to build/extend existing
API What if the legacy app goes down? Cons
4. Creating APIs
Websocket Services Streaming services APIs for Mobile Apps Proxy serivces
File upload handling Ebay’s ql.io Examples
DB Node Clients
Handle very load Lots of concurrent connections JSON comes naturally
Pros
Cons You now have a dependeny on Node System adminstration
Teaching others about it
mysql Rails Disc Cache Nginx Redis Node Browser Pusher http://live.mpora.com
Mpora Live
5. Message Queues
ZeroMQ Resque Redis Pubsub dnode Examples
Message Queue Legacy App Node Legacy Worker
6. Streams
Twitter, Facebook, Salesforce HTTP long polling Comet XMPP Examples
7. Embedding
Ruby Racer Android Hadoop and Timothy Sprintstack PLV8 Examples
create or replace function fib(n int) returns int as $$
function fib(n) { return n<2 ? n : fib(n-1) + fib(n-2) } return fib(n) $$ LANGUAGE plv8 IMMUTABLE STRICT;
http://pgeu-plv8.herokuapp.com
Legacy App Node
Scripting within compiled languages Use existing, battle tested software Enable
Node on embedded devices Pros
Under heavy development You need to know the host platform
Context switching overhead Cons
Take a unix-like approach Decoupled Systems Use APIs to share
data Play to node’s strengths Summary
Node on Andriod - lanyrd.com/smpbg Rails and Node.js - lanyrd.com/srmwr
Hadoop and Timothy - lanyrd.com/sttxx Rhinode (Sprintstack) - lanyrd.com/srmwx These slides - lanyrd.com/szwyc Links