Craig Spaeth & Brennan Moore
Artsy Web Engineering
@craigspaeth & @zamiang
WHY WE MIGRATED TO NODE
RUBY ON RAILS
RUBY
ON
RAILS
API
BACKBONE UI
IOS PROTOTYPE
BACKBONE UI
M
O
BILE
W
EB
BRO
KEN
M
O
BI...
KEN
EB
BRO
KEN
PROBLEMS WITH BACKBONE + RAILS STACK
• Slow JS testing
• Ruby/JS—lack of re-use
• Hard to understand
hybrid...
INTRODUCING NODE INTO THE STACK
RUBY API
BACKBONE
FRONT-END
CMS
INTRODUCING NODE INTO THE STACK
CMS
RUBY API
BACKBONE
FRONT-END
MOBILE WEB
Redirect mobile User Agents
INTRODUCING NODE INTO THE STACK
CMS
RUBY API
MOBILE WEB
DESKTOP WEB
Avoiding Death
by Rewrite
Gustavo Rezende
Valquíria, 2009
MIGRATING USERS PAGE BY PAGE UNTIL NODE WAS IN FRONT
NEW
NODE APP
LEGACY
RAILS APP
HAPROXY
/browse
/artist/:id
/tag/:id
NE...
OUR STACK NOW
RUBY API
NODE TOOLS HOSTING CACHING
NODE SERVER
ASSET CDN
MEET EZEL: ARTSY’S JS APP BOILERPLATE
• Philosophy: Modularity, Flexibility, Isomorphic
• Apps: Express sub-apps mounted
•...
PAIN POINTS IN TRANSITION
• Syncing auth
• Tracking memory usage
& leaks
• npmjs.org stability
• Integration testing a
dis...
WINS
Community
• npm for server & client
Productivity
• 1,000+ tests under 5 mins.
• 5 min. deploys, ~5 times a day
Perfor...
Thank you
@craigspaeth
@zamiang
github.com/artsy
SAMPLE SETUP.JS
DIRECTORY STRUCTURE
Upcoming SlideShare
Loading in …5
×

Artsy at Node on the Road

483 views

Published on

Slides for a talk given at Node on The Road found here: https://www.joyent.com/developers/videos/node-js-on-the-road-nyc-craig-spaeth-brennan-moore. These outline Artsy's (artsy.net) transition from a monolithic Ruby on Rails stack to a distributed system with Node.js powered front ends.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
483
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Artsy at Node on the Road

  1. 1. Craig Spaeth & Brennan Moore Artsy Web Engineering @craigspaeth & @zamiang
  2. 2. WHY WE MIGRATED TO NODE RUBY ON RAILS RUBY ON RAILS API BACKBONE UI IOS PROTOTYPE BACKBONE UI M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W V EB BRO KE M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W V EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W V EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN T M O BILE W EB BRO KEN M O BILE W EB M O BIL O BILE W EB BRO KEN M O BILE W EB BRO KEN M O BILE W EB BRO KEN RUBY ON RAILS ANALYTICS EMAL GENERATORS API ADMINPANELCODE IOS APP CMS
  3. 3. KEN EB BRO KEN PROBLEMS WITH BACKBONE + RAILS STACK • Slow JS testing • Ruby/JS—lack of re-use • Hard to understand hybrid stack • Huge single page app • Bloated & slow assets
  4. 4. INTRODUCING NODE INTO THE STACK RUBY API BACKBONE FRONT-END CMS
  5. 5. INTRODUCING NODE INTO THE STACK CMS RUBY API BACKBONE FRONT-END MOBILE WEB Redirect mobile User Agents
  6. 6. INTRODUCING NODE INTO THE STACK CMS RUBY API MOBILE WEB DESKTOP WEB
  7. 7. Avoiding Death by Rewrite Gustavo Rezende Valquíria, 2009
  8. 8. MIGRATING USERS PAGE BY PAGE UNTIL NODE WAS IN FRONT NEW NODE APP LEGACY RAILS APP HAPROXY /browse /artist/:id /tag/:id NEW NODE APP HAPROXY + LEGACY RAILS APP NODE-HTTP-PROXY
  9. 9. OUR STACK NOW RUBY API NODE TOOLS HOSTING CACHING NODE SERVER ASSET CDN
  10. 10. MEET EZEL: ARTSY’S JS APP BOILERPLATE • Philosophy: Modularity, Flexibility, Isomorphic • Apps: Express sub-apps mounted • Components: Modules of UI grouping CSS, templates, and JS together • Simple re-use, small asset package size, test everything in Node • Ezeljs.com
  11. 11. PAIN POINTS IN TRANSITION • Syncing auth • Tracking memory usage & leaks • npmjs.org stability • Integration testing a distributed architecture Patrick Lichty A Failure in The Interwebz, 2013
  12. 12. WINS Community • npm for server & client Productivity • 1,000+ tests under 5 mins. • 5 min. deploys, ~5 times a day Performance • Page load speed cut in half • 40+ Rails servers to 2 Node servers • SEO—Shared rendering server/client Patrick Lichty A Failure in The Interwebz, 2013 Loving Parent Success Baby, circa. 2007
  13. 13. Thank you @craigspaeth @zamiang github.com/artsy
  14. 14. SAMPLE SETUP.JS
  15. 15. DIRECTORY STRUCTURE

×