SOFTWARE DEVELOPMENT CORPORATION (OSD)
Building a RESTful API
and
Deploy to Cloud
About Me
Sang Cù
Imageware AS
Skype: sangcn
WHY
Build fast
and
Scalable
Success Stories
Success Stories
Built a Node version of a Java app
half the time with fewer developers
to
Ref: https://www.paypal-engineer...
Success Stories
“Velocity was the key driving point for PayPal's move to Node. We found it
enabled a huge boost to our wor...
Success Stories
Success Stories
Easily serving 50,000 requests/minute
Handling the same amount of traffic
as before but with less hardware...
Success Stories
Success Stories
Ref: http://www.slideshare.net/joemccann/the-business-case-for-node
55% of all traffic on Black Friday wen...
Success Stories
Ref: http://www.slideshare.net/joemccann/the-business-case-for-node
CPU Utilization hovered around 1%.
Dev...
Agenda
 Application Stack
 Deployment Stack
 Configurations
 Routing
 Authentication/Authorization
 Testing
 Deploy...
Application Stack
RESTful API
ExpressJS
Mongoose
MongoDB Memory Caching
Controller
Key-Value Handler
Deployment Stack
Nodejs App
Github
Heroku – Cloud Application Platform
Travis
Configuration
Developing Mode Production Mode
Routing
ExpressJS – Web application framework for Node
Routing
ExpressJS – Web application framework for Node
Authentication
Create a middleware for Expressjs
Testing
Testing
• Config package.json
• make test
• Setup multi testing environment
Process.env.NODE_ENV = “(environment name)”
Testing
Deployment
Demo
Monitoring
NewRelic for Node
Monitoring
Reference
1. Nodejs - http://nodejs.org/
2. Expressjs - http://expressjs.com/
3. MongoDB - https://www.mongodb.org/
4. Mon...
SOFTWARE DEVELOPMENT CORPORATION (OSD)
Nodejs - Building a RESTful API
Upcoming SlideShare
Loading in...5
×

Nodejs - Building a RESTful API

394

Published on

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
394
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
15
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Nodejs - Building a RESTful API

  1. 1. SOFTWARE DEVELOPMENT CORPORATION (OSD) Building a RESTful API and Deploy to Cloud
  2. 2. About Me Sang Cù Imageware AS Skype: sangcn
  3. 3. WHY Build fast and Scalable
  4. 4. Success Stories
  5. 5. Success Stories Built a Node version of a Java app half the time with fewer developers to Ref: https://www.paypal-engineering.com/2013/11/22/node-js-at-paypal/
  6. 6. Success Stories “Velocity was the key driving point for PayPal's move to Node. We found it enabled a huge boost to our workflow allowing us to iterate faster and innovate more.” –Jeff Harrel, Director of User Interface Engineering
  7. 7. Success Stories
  8. 8. Success Stories Easily serving 50,000 requests/minute Handling the same amount of traffic as before but with less hardware. Ref: http://www.slideshare.net/joemccann/the-business-case-for-node
  9. 9. Success Stories
  10. 10. Success Stories Ref: http://www.slideshare.net/joemccann/the-business-case-for-node 55% of all traffic on Black Friday went to Node servers. Not a single Node server went down. Zero.
  11. 11. Success Stories Ref: http://www.slideshare.net/joemccann/the-business-case-for-node CPU Utilization hovered around 1%. Developers “were bored” that day.
  12. 12. Agenda  Application Stack  Deployment Stack  Configurations  Routing  Authentication/Authorization  Testing  Deployment  Monitoring
  13. 13. Application Stack RESTful API ExpressJS Mongoose MongoDB Memory Caching Controller Key-Value Handler
  14. 14. Deployment Stack Nodejs App Github Heroku – Cloud Application Platform Travis
  15. 15. Configuration Developing Mode Production Mode
  16. 16. Routing ExpressJS – Web application framework for Node
  17. 17. Routing ExpressJS – Web application framework for Node
  18. 18. Authentication Create a middleware for Expressjs
  19. 19. Testing
  20. 20. Testing • Config package.json • make test • Setup multi testing environment Process.env.NODE_ENV = “(environment name)”
  21. 21. Testing
  22. 22. Deployment Demo
  23. 23. Monitoring NewRelic for Node
  24. 24. Monitoring
  25. 25. Reference 1. Nodejs - http://nodejs.org/ 2. Expressjs - http://expressjs.com/ 3. MongoDB - https://www.mongodb.org/ 4. Mongoose –mongoosejs.com 5. Request - https://www.npmjs.org/package/request 6. Es6-Promise - https://www.npmjs.org/package/es6-promise 7. NewRelic - http://newrelic.com/application-monitoring 8. Travis CI - https://travis-ci.org/ 9. Heroku Cloud - https://www.heroku.com/
  26. 26. SOFTWARE DEVELOPMENT CORPORATION (OSD)
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×