SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Joys and Pains of Node.js in
       the Enterprise

 Marc Fasel @marcfasel
 Shine Technologies http://blog.shinetech.com
Node.js is Hot




http://cavemancircus.com/2010/02/26/hipster-douchebags/
http://www.quora.com/Brogramming/How-does-a-programmer-become-a-brogrammer
Node.js is Hot




http://cavemancircus.com/2010/02/26/hipster-douchebags/
http://www.quora.com/Brogramming/How-does-a-programmer-become-a-brogrammer
Node.js is Hot




            Hipster Hackers
http://cavemancircus.com/2010/02/26/hipster-douchebags/
http://www.quora.com/Brogramming/How-does-a-programmer-become-a-brogrammer
Node.js is Hot




            Hipster Hackers
http://cavemancircus.com/2010/02/26/hipster-douchebags/
http://www.quora.com/Brogramming/How-does-a-programmer-become-a-brogrammer
Node.js is Hot




            Hipster Hackers                                         Brogrammers
http://cavemancircus.com/2010/02/26/hipster-douchebags/
http://www.quora.com/Brogramming/How-does-a-programmer-become-a-brogrammer
Node.js is Controversy




http://teddziuba.com/2011/10/node-js-is-cancer.html
http://blog.brianbeck.com/post/10967024222/node-js-cures-cancer
Node.js is Controversy




http://teddziuba.com/2011/10/node-js-is-cancer.html
http://blog.brianbeck.com/post/10967024222/node-js-cures-cancer
Node.js is Controversy




http://teddziuba.com/2011/10/node-js-is-cancer.html
http://blog.brianbeck.com/post/10967024222/node-js-cures-cancer
Shine Technologies
 Specialises in Enterprise software development
 Large corporations
 Node.js since version 0.2
 Several Enterprise Node.js projects
The Enterprise
 Team of Developers
 Long life-cycle
 Other stakeholders
http://citysearch.com.au
Node.js
 JavaScript on the server
 Asynchronous event-driven non-blocking I/O
    Event-loop
    Asynchronous non-blocking I/O libraries
Multi-Threading
Event Loop
Node is Different!
Experiences

 Node.js
 JavaScript
 Ecosystem
Node.js
Node.js
 Early adopters
 Only version 0.6: Not officially production-ready
 Surprisingly stable since 0.2
 Fundamental API changes
 Significant infrastructure still missing
Asynchronous Evented I/O

 Highly specialised I/O model
 Particularly useful for high concurrency
 Steep learning curve
 Control flow burden on the programmer
Hello World




http://nodejs.org/
Callback Hell




http://stackoverflow.com/questions/4234619/how-to-avoid-long-nesting-of-asynchronous-functions-in-node-js
Performance
JavaScript
JavaScript
 Most common programming language in the world
 Will only increase in popularity
 Dynamic, interpreted language
    Quick development turn-around
JavaScript from Nose to Tail

 jQuery - Node.js - CouchDB
 Single development language
 No translation between layers
 JavaScript Object is a JSON object is a JavaScript object
JavaScript: Not All Joy
 Ben Teese: JavaScript is a dog of a language.
 Interpreted: All errors occur at runtime
 Test, test, test
 Dynamic typing: Refactoring difficult
 Programming conventions not widely used
 No provisions for programming-in-the-large
Community

 Open, helpful, and welcoming
 Exploding ecosystem
 TJ Holowaychuk: “If I only had a dime for every Ruby
 library poorly ported to Node”
When Choose Node.js?
High concurrency
JavaScript from head to tail
Quick development turn-around
Keep in mind
   Asynchronous programming is a burden
   Define programming conventions early
   Stay in sync with Node.js versions
Questions?

 When is the coffee break?
References
 Node.js vs. PHP: http://www.synchrosinteractive.com/blog/9-nodejs/22-nodejs-has-a-bright-
 future

 Node.js vs. Python: http://blog.mixu.net/2011/01/17/performance-benchmarking-the-node-js-
 backend-of-our-48h-product-wehearvoices-net/

 Express vs. Sinatra: http://tjholowaychuk.com/post/543953703/express-vs-sinatra-benchmarks

 JavaScript from Nose to Tail: http://www.slideshare.net/cliffano/javascript-everywhere-from-nose-
 to-tail

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (17)

Have we forgotten how to program? - Tunisian WebDev MeetUp
Have we forgotten how to program? - Tunisian WebDev MeetUpHave we forgotten how to program? - Tunisian WebDev MeetUp
Have we forgotten how to program? - Tunisian WebDev MeetUp
 
Firefox os how large open source project works
Firefox os   how large open source project worksFirefox os   how large open source project works
Firefox os how large open source project works
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
5 best practices for (web/ software) development (2010)
5 best practices for (web/ software) development (2010)5 best practices for (web/ software) development (2010)
5 best practices for (web/ software) development (2010)
 
JavaScript와 TypeScript의 으리 있는 만남
JavaScript와 TypeScript의 으리 있는 만남JavaScript와 TypeScript의 으리 있는 만남
JavaScript와 TypeScript의 으리 있는 만남
 
Webview: The fifth element
Webview: The fifth elementWebview: The fifth element
Webview: The fifth element
 
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
 
Swt J Face 3/3
Swt J Face 3/3Swt J Face 3/3
Swt J Face 3/3
 
BotCommons: Metadata for Bots - Devoxx 2017
BotCommons: Metadata for Bots - Devoxx 2017BotCommons: Metadata for Bots - Devoxx 2017
BotCommons: Metadata for Bots - Devoxx 2017
 
html5 & phonegap
html5 & phonegaphtml5 & phonegap
html5 & phonegap
 
2013 10-02-backbone-robots-aarhus
2013 10-02-backbone-robots-aarhus2013 10-02-backbone-robots-aarhus
2013 10-02-backbone-robots-aarhus
 
Patterns and antipatterns in Docker image lifecycle as was presented at Devop...
Patterns and antipatterns in Docker image lifecycle as was presented at Devop...Patterns and antipatterns in Docker image lifecycle as was presented at Devop...
Patterns and antipatterns in Docker image lifecycle as was presented at Devop...
 
git commit -m "carreira"
git commit -m "carreira"git commit -m "carreira"
git commit -m "carreira"
 
AMKSS Career Conference 2018: Software Engineering
AMKSS Career Conference 2018: Software EngineeringAMKSS Career Conference 2018: Software Engineering
AMKSS Career Conference 2018: Software Engineering
 
Patterns and antipatterns in Docker image lifecycle as was presented at Scale...
Patterns and antipatterns in Docker image lifecycle as was presented at Scale...Patterns and antipatterns in Docker image lifecycle as was presented at Scale...
Patterns and antipatterns in Docker image lifecycle as was presented at Scale...
 
Word Camp Kansai 2014 - MVC Framework
Word Camp Kansai 2014 - MVC FrameworkWord Camp Kansai 2014 - MVC Framework
Word Camp Kansai 2014 - MVC Framework
 
Starters with Django
Starters with Django Starters with Django
Starters with Django
 

Ähnlich wie Joys and Pains of Node.js in the Enterprise

Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
Pierre Joye
 
Open source secret_sauce_apache_con_2010
Open source secret_sauce_apache_con_2010Open source secret_sauce_apache_con_2010
Open source secret_sauce_apache_con_2010
Ted Husted
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web Architectures
Keith Fitzgerald
 
Web Frameworks of the Future
Web Frameworks of the FutureWeb Frameworks of the Future
Web Frameworks of the Future
elliando dias
 
Open Source Secret Sauce - Lugor Sep 2011
Open Source Secret Sauce - Lugor Sep 2011Open Source Secret Sauce - Lugor Sep 2011
Open Source Secret Sauce - Lugor Sep 2011
Ted Husted
 
JavaScript & Enterprise BED-Con 2014 Berlin German
JavaScript & Enterprise BED-Con 2014 Berlin GermanJavaScript & Enterprise BED-Con 2014 Berlin German
JavaScript & Enterprise BED-Con 2014 Berlin German
Adam Boczek
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScript
Oleg Podsechin
 

Ähnlich wie Joys and Pains of Node.js in the Enterprise (20)

JavaScript - The Universal Platform?
JavaScript - The Universal Platform?JavaScript - The Universal Platform?
JavaScript - The Universal Platform?
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
 
Open source secret_sauce_apache_con_2010
Open source secret_sauce_apache_con_2010Open source secret_sauce_apache_con_2010
Open source secret_sauce_apache_con_2010
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web Architectures
 
Apache Flex and the imperfect Web
Apache Flex and the imperfect WebApache Flex and the imperfect Web
Apache Flex and the imperfect Web
 
Web Frameworks of the Future
Web Frameworks of the FutureWeb Frameworks of the Future
Web Frameworks of the Future
 
Open Source Secret Sauce - Lugor Sep 2011
Open Source Secret Sauce - Lugor Sep 2011Open Source Secret Sauce - Lugor Sep 2011
Open Source Secret Sauce - Lugor Sep 2011
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with Appcelerator
 
Morden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web AppsMorden F2E Education - Think of Progressive Web Apps
Morden F2E Education - Think of Progressive Web Apps
 
Don't screw it up! How to build durable API
Don't screw it up! How to build durable API Don't screw it up! How to build durable API
Don't screw it up! How to build durable API
 
Open source-secret-sauce-rit-2010
Open source-secret-sauce-rit-2010Open source-secret-sauce-rit-2010
Open source-secret-sauce-rit-2010
 
Active Web Development
Active Web DevelopmentActive Web Development
Active Web Development
 
Getting started with developing Nodejs
Getting started with developing NodejsGetting started with developing Nodejs
Getting started with developing Nodejs
 
JavaScript & Enterprise BED-Con 2014 Berlin German
JavaScript & Enterprise BED-Con 2014 Berlin GermanJavaScript & Enterprise BED-Con 2014 Berlin German
JavaScript & Enterprise BED-Con 2014 Berlin German
 
Advancing JavaScript without breaking the web - MunichJS
Advancing JavaScript without breaking the web - MunichJSAdvancing JavaScript without breaking the web - MunichJS
Advancing JavaScript without breaking the web - MunichJS
 
[DevDay2018] Javascript on the Rise - By Trang Tran, Co-founder & Manager at ...
[DevDay2018] Javascript on the Rise - By Trang Tran, Co-founder & Manager at ...[DevDay2018] Javascript on the Rise - By Trang Tran, Co-founder & Manager at ...
[DevDay2018] Javascript on the Rise - By Trang Tran, Co-founder & Manager at ...
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level Overview
 
Composer at Scale, Release and Dependency Management
Composer at Scale, Release and Dependency ManagementComposer at Scale, Release and Dependency Management
Composer at Scale, Release and Dependency Management
 
Progressing JavaScript and Apps the Web way…
 Progressing JavaScript and Apps the Web way…  Progressing JavaScript and Apps the Web way…
Progressing JavaScript and Apps the Web way…
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScript
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Joys and Pains of Node.js in the Enterprise

Hinweis der Redaktion

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. Node.js started in 6/2009\nStarted to appear on radar 6/2010\nShine involved since 11/2010\n\n
  9. Enterprise as in Enterprise Java\nEnterprise: Big and important\nProjects with long life-cycle\nSeparate deployment team, test team\n
  10. \nCitySearch is an online city guide for all major Australian cities\nInformation on Restaurants, Bars&Clubs,Music,... \nRun by Sensis, a subsidiary of Telstra\nUsed to be Enterprise Java\nRuns on two clustered Node.js servers front-end and 2 clustered CouchDB servers back-end\n6 Million requests per month\n\n
  11. Alternative to multi-threading\nOne event loop for all requests\nJavaScript on the Server with a side of asynchronous evented I/O \n
  12. Constraints: Memory and CPU\nMinimum memory per thread in JVM 48K\n\n
  13. \n
  14. \n
  15. \n
  16. \n
  17. Early adopters\n\n
  18. Do we have high concurrency? What is high concurrency? C10K requests\nGoogle gets 3 billion per day, 34000 searches per second, 200ms \n= 6800 concurrent requests\n\nSynchronous Application programmer: Business logic\nAsynchronous: More burden on control flow\n\nOnce you start using asynchronous code, all your code will turn asynchronous\n\nGoogle = Java, C++, Python\nFacebook = Optimised PHP\neBay = Java\n\n
  19. Bare metal\n
  20. \n
  21. \n\n
  22. On par similar interpreted languages\nLinkedIn switched from Rails to Node.js for their mobile site and saw a huge performance increase\n\nPHP’s lack of performance didn’t hinder its rise to fame\n
  23. \n
  24. \n
  25. Marriage of HTML5/CSS/JavaScript\nFat client apps are coming\nFat-client HTML5/CSS/JavaScript is JQuery ^2: Sproutcore, Cappuchino\nGMail\nTwitter\nJavaScript is a mixed blessing!\nInterpreted\nAll errors occur at runtime\nTesting, testing, testing\nDynamic typing\nCode refactoring difficult\n\nJavaScript is a mixed blessing\n
  26. Node.js makes this possible!\nBackbone.js\nValidation logic\nJQuery - Node - CouchDB \nEven in the DB layer!\n\nJavaScript from Head to Tail is a win\n
  27. 60% test code vs. 40% application code; 10000 LOC application code 15000 LOC test code\n\nImagine upgrading the Node.js library\n
  28. Quick turn-around\nInterpreted: Short cycle between code changes \nDynamic typing: No need to bother with complex object model\nPattern language: Delegates, Facades, Service locators, \nSpeed-up JavaScript vs. Java: 1 day vs. 1 week\n\n
  29. Example: 15 000 LOC test code for 10 000 LOC application code\n\nNo programming patterns -> No programming standards\nModule system with imports\nPublic methods and interfaces \nClasses and Inheritance \nNo programming standards established\nModule naming, logging, file naming\nProgramming patterns\n\nAs team grows and project grows\n
  30. Node.js addresses these issues by retrofitting the language with these concepts (CommonJS for interface/ public methods, import) \nThis is ill-fitting at best\nModule system with imports\nPublic methods and interfaces \nClasses and Inheritance \nCoffee-Script\nNo programming standards established\nModule naming, logging, file naming\nProgramming patterns\n\n\n
  31. “I write Enterprise Software” is meant to sound like “I write big and important software”\nEnterprise Java world\nTedious\nEnterprise Architecture\n200 000 requests per day\n
  32. Easy to read, easy to use!\n
  33. \n
  34. \n
  35. \n
  36. How hard is it to find developers for this technology? New technology, but surprisingly not too complex. It is relatively easy to start developing\nWill they be around in 5 years? With the current Renaissance of JavaScript as a fat-client programming language - Quite possible; it is lacking a strong corporate sponsor; maybe Yahoo will do that\nHow hard is it to install Node.js, monitor Node.js , deploy applications to Node.js? Easy\nHow hard is it to convince operators to do that? Difficult\n\n\n
  37. How does Node.js programs scale?\nCan I write a lot lot code and still manage it? \nNo defined package structure\nModules are from CommonJS with public and private methods\nNo Interfaces\nNo Inheritance\nAsynchronous Programming\nSmall to medium projects best -> If the client logic is done in JavaScript, then there is not that much left to do in Node.js\n \n\n
  38. 200 000 requests per day\nPHP > Ruby > Python > Node.js \nJava EE\n\n
  39. 200 000 requests per day\n
  40. 200 000 requests per day\n
  41. 200 000 requests per day\n
  42. 200 000 requests per day\n
  43. 200 000 requests per day\n
  44. 200 000 requests per day\n
  45. Feel the excitement!\nYoung developers lack Enterprise experience\nGithub: Social Coding\n“Look Ma, I built a framework!”\nFramework\n* Experience\n* Responsibility\nCreator of some central Node.js frameworks\n \n
  46. Github\n
  47. \n
  48. \n
  49. Quick turn-around in development\n* Small team\n* Small code base\n
  50. \n
  51. \n