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
740
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
95
Can my friends come too?
andrew
5
2.2k
Elasticsearch on Rails
andrew
1
350
24 Pull Requests
andrew
0
490
Hardware Hacking with JavaScript
andrew
1
310
Robotics 101
andrew
4
700
Learning how to Tinker
andrew
2
850
Nodecopter Pivotal
andrew
1
110
BathRuby on Robots
andrew
0
92
Other Decks in Technology
See All in Technology
AWS Lambdaで実現するスケーラブルで低コストなWebサービス構築/YAPC::Hakodate2024
fujiwara3
2
180
Renovate ではじめる運用レスなライブラリ更新 / 令和最新版 他人に自慢したいヤバいCI/CD LT会 @ yabaibuki.dev #2
ponkio_o
PRO
1
120
Oracle GoldenGate 23ai 導入Tips
oracle4engineer
PRO
1
190
Report of JAWS PANKRATION 2024, a global online event using Amazon IVS
yoshimi0227
1
130
Causal Impactを用いたLINE Pay UIの効果検証とABテスト実施への貢献
lycorptech_jp
PRO
2
460
Android15(SDK35)から強制される、Edge-to-Edgeに対応しなければならない
sansantech
PRO
1
630
Valuable Software Engineering
avandeursen
0
240
Sansanにおける全社横断データ分析基盤の挑戦と未来 / Challenges and Future of Cross-Organizational Data Analytics Platform at Sansan
sansan_randd
2
300
All your memory are belong to… whom?
ennael
PRO
0
480
リスクから学ぶKubernetesコンテナセキュリティ/k8s-risk-and-security
mochizuki875
1
250
位置情報とオープンソースがやりたくてMIERUNEに転職した話 〜経歴、事例紹介、GISへのいざない〜 / MIERUNE JCT - Tokyo 2024
mierune
PRO
0
390
Oracle Database 23ai 新機能#4 Real Application Clusters
oracle4engineer
PRO
0
100
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
48
7.1k
Principles of Awesome APIs and How to Build Them.
keavy
125
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
124
18k
The Invisible Customer
myddelton
119
13k
Robots, Beer and Maslow
schacon
PRO
157
8.2k
Bash Introduction
62gerente
608
210k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
7
550
Why Our Code Smells
bkeepers
PRO
334
57k
Done Done
chrislema
180
16k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
503
140k
Mobile First: as difficult as doing things right
swwweet
221
8.8k
GitHub's CSS Performance
jonrohan
1030
450k
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