SlideShare una empresa de Scribd logo
1 de 30
Getting small for the enterprise.

Beyond the
MEAN stack

@othiym23
forrest@newrelic.com
github.com/othiym23
you chose Node for a reason

Node is fast
Node is modular
Node is fun
so why turn it into something else?
Node is built on the
sound engineering
values:
low coupling
high cohesion
“

is the

of

Web development is more pattern-driven:
is this social media?
is this a storefront?
is this… is this a cms?

.”
moduletopia™
Node loves modules:
more all the time
available for almost every use case
pretty easy to understand
(mostly) on GitHub
(mostly) freely usable
stacks: khakis of the internet

familiar: faster to build things you already know
comforting: already integrated / tested / shipped
easy: developers only need master one set of tools
stacks are sticky

opaque: full of implicit assumptions and requirements
complicated: hard to master, easy to break
monolithic: have to pay for the whole thing (but only
using some of it)
Node says: build only what you need.
one size does not fit all
one size does not fit all
one size does not fit all
some Node use cases
streaming
json apis
multiplexing
soft realtime
proxying
…you know, fast web servers
& some legacy glue
dat: scraping & etl
dinosaur taming: Oracle & xml
~50k modules: there’s a pony in there somewhere
Windows: best support of any of the major scripting
languages
the zen of Node
self-contained: code over configuration
modular: inversion of control & direct dependency
injection
simple: one small thing in one short file
and so: easy for new people to pick up, easy to maintain
be nice, not mean
MEAN: MongoDB
instead of MongoDB: Redis
fast: data lives in memory
powerful: many different data types, lots of operations
flexible: many options for high availability and
clustering
a veteran: battle-tested in Node
instead of MongoDB: MySQL*
“simple” and “fast” are its best features
time-tested
some data are just plain relational
can actually be managed
* or PostgreSQL (<3

)
instead of MongoDB: leveldb
a do-it-yourself dbms
rapidly-growing ecosystem
simple
not all there yet, but built on a solid foundation
MEAN: Express
instead of Express: hapi

plugins instead of middleware
configuration-centric
optimized for large teams
instead of Express: Restify
api “compatible” with Express’s
meant for building restful apis
optimized for json
instrumented for operational monitoring
instead of Express: Sails

actually built on top of Express
feels like Rails (including scaffolding)
realtime
stack-like, but still a creature of parts
MEAN: AngularJS
instead of Angular:
browserify
puts Node modules in your browser
puts Node ideology in your browser
everything’s on npm
flexible packaging pipeline
good for Node-first developers
instead of Angular: component

similar to browserify
built on GitHub
not so much with the asset pipeline
more focused on client-side development than
browserify
instead of Angular:
bower / Yeoman

an integrated, browserfocused workflow
very rich asset pipeline
good for client-first
developers
MEAN: Node.js

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

You know what iMEAN? Using MEAN stack for application dev on Informix
You know what iMEAN? Using MEAN stack for application dev on InformixYou know what iMEAN? Using MEAN stack for application dev on Informix
You know what iMEAN? Using MEAN stack for application dev on Informix
 
NodeJS
NodeJSNodeJS
NodeJS
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
When Will Drupal Die? (Keynote talk)
When Will Drupal Die? (Keynote talk)When Will Drupal Die? (Keynote talk)
When Will Drupal Die? (Keynote talk)
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An Overview
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS
 
Building a REST API with Node.js and MongoDB
Building a REST API with Node.js and MongoDBBuilding a REST API with Node.js and MongoDB
Building a REST API with Node.js and MongoDB
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
 
Intro to Node.js
Intro to Node.jsIntro to Node.js
Intro to Node.js
 
Building your first MEAN application
Building your first MEAN applicationBuilding your first MEAN application
Building your first MEAN application
 
MongoDB
MongoDBMongoDB
MongoDB
 
Nodejs
NodejsNodejs
Nodejs
 
MongoDB and Node.js
MongoDB and Node.jsMongoDB and Node.js
MongoDB and Node.js
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
 
Node.js primer
Node.js primerNode.js primer
Node.js primer
 
Best node js course
Best node js courseBest node js course
Best node js course
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 

Similar a Beyond the MEAN Stack: Thinking Small with Node.js for the Enterprise

Hybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS ApplicationsHybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS Applications
Steven Francia
 
NoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOONoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOO
James Hollingworth
 

Similar a Beyond the MEAN Stack: Thinking Small with Node.js for the Enterprise (20)

MongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of viewMongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of view
 
Austin Web Architecture
Austin Web ArchitectureAustin Web Architecture
Austin Web Architecture
 
Meanstack overview
Meanstack overviewMeanstack overview
Meanstack overview
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
 
Developing and Testing a MongoDB and Node.js REST API
Developing and Testing a MongoDB and Node.js REST APIDeveloping and Testing a MongoDB and Node.js REST API
Developing and Testing a MongoDB and Node.js REST API
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development Tools
 
Why You Should Use MERN Stack for Startup Apps?
Why You Should Use MERN Stack for Startup Apps?Why You Should Use MERN Stack for Startup Apps?
Why You Should Use MERN Stack for Startup Apps?
 
Techorama - Evolvable Application Development with MongoDB
Techorama  - Evolvable Application Development with MongoDBTechorama  - Evolvable Application Development with MongoDB
Techorama - Evolvable Application Development with MongoDB
 
TiConf NY 2014 - Alloy 2.0
TiConf NY 2014 - Alloy 2.0TiConf NY 2014 - Alloy 2.0
TiConf NY 2014 - Alloy 2.0
 
Which database should I use for my app?
Which database should I use for my app?Which database should I use for my app?
Which database should I use for my app?
 
The Next Big Thing: Serverless
The Next Big Thing: ServerlessThe Next Big Thing: Serverless
The Next Big Thing: Serverless
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js Tutorial
 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdf
 
Hybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS ApplicationsHybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS Applications
 
Open source Technology
Open source TechnologyOpen source Technology
Open source Technology
 
Node js
Node jsNode js
Node js
 
Mongodb
MongodbMongodb
Mongodb
 
NoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOONoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOO
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
 
Mongo DB at Community Engine
Mongo DB at Community EngineMongo DB at Community Engine
Mongo DB at Community Engine
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Beyond the MEAN Stack: Thinking Small with Node.js for the Enterprise

  • 1. Getting small for the enterprise. Beyond the MEAN stack @othiym23 forrest@newrelic.com github.com/othiym23
  • 2. you chose Node for a reason Node is fast Node is modular Node is fun
  • 3. so why turn it into something else?
  • 4. Node is built on the sound engineering values: low coupling high cohesion
  • 5. “ is the of Web development is more pattern-driven: is this social media? is this a storefront? is this… is this a cms? .”
  • 6. moduletopia™ Node loves modules: more all the time available for almost every use case pretty easy to understand (mostly) on GitHub (mostly) freely usable
  • 7. stacks: khakis of the internet familiar: faster to build things you already know comforting: already integrated / tested / shipped easy: developers only need master one set of tools
  • 8. stacks are sticky opaque: full of implicit assumptions and requirements complicated: hard to master, easy to break monolithic: have to pay for the whole thing (but only using some of it)
  • 9. Node says: build only what you need.
  • 10. one size does not fit all
  • 11. one size does not fit all
  • 12. one size does not fit all
  • 13.
  • 14. some Node use cases streaming json apis multiplexing soft realtime proxying …you know, fast web servers
  • 15. & some legacy glue dat: scraping & etl dinosaur taming: Oracle & xml ~50k modules: there’s a pony in there somewhere Windows: best support of any of the major scripting languages
  • 16. the zen of Node self-contained: code over configuration modular: inversion of control & direct dependency injection simple: one small thing in one short file and so: easy for new people to pick up, easy to maintain
  • 17. be nice, not mean
  • 19. instead of MongoDB: Redis fast: data lives in memory powerful: many different data types, lots of operations flexible: many options for high availability and clustering a veteran: battle-tested in Node
  • 20. instead of MongoDB: MySQL* “simple” and “fast” are its best features time-tested some data are just plain relational can actually be managed * or PostgreSQL (<3 )
  • 21. instead of MongoDB: leveldb a do-it-yourself dbms rapidly-growing ecosystem simple not all there yet, but built on a solid foundation
  • 23. instead of Express: hapi plugins instead of middleware configuration-centric optimized for large teams
  • 24. instead of Express: Restify api “compatible” with Express’s meant for building restful apis optimized for json instrumented for operational monitoring
  • 25. instead of Express: Sails actually built on top of Express feels like Rails (including scaffolding) realtime stack-like, but still a creature of parts
  • 27. instead of Angular: browserify puts Node modules in your browser puts Node ideology in your browser everything’s on npm flexible packaging pipeline good for Node-first developers
  • 28. instead of Angular: component similar to browserify built on GitHub not so much with the asset pipeline more focused on client-side development than browserify
  • 29. instead of Angular: bower / Yeoman an integrated, browserfocused workflow very rich asset pipeline good for client-first developers

Notas del editor

  1. • the name of this talk comes from a thing I’ve seen out there: the “MEAN (or Mongo-Express-Angular-Node) stack” • this isn’t actually a thing, but I understand why some people want it to be, and will go into both what I think their motivations are and why I ultimately think they should let it go
  2. • Facts and Fallacies is a wonderful book, pragmatic and filled with evidence • it provides an empirical basis for a lot of software engineering’s core principles • and these cornerstones of good software engineering are pretty simple: they’re low coupling and high cohesion • put another way, each piece should do only one thing, and do it well • the Node community honors these values in a pretty plainspoken way • publish everything as its own module • don’t put in anything you don’t need
  3. • web development tends to be more pattern-driven: does this new product look like Facebook? does it look like Amazon? does it look like Wordpress? [the Instagram of fax machines / the Netflix of underwear / the Klout of bail bond services (one of those is real)]
  4. • this is practically an ideology in the Node community – modules are plentiful and very focused, and tend to be simple enough that a moderately experienced developer can understand a new module in less than an afternoon [the biggest problem with Node’s module ecosystem is discoverability]
  5. • it&apos;s tempting as a business owner to spec projects out this way, because it feels faster to frame new products in terms of things you already know • and it&apos;s comforting to think in terms of frameworks or stacks, because you know they&apos;ve already been integrated, tested and delivered at least once • this reduces risk and gives some sense of the scope of work • and some devs prefer frameworks because it allows them to master one set of tools and use them to quickly put together new things
  6. • but stacks are sticky – they contain implicit assumptions and requirements that may not match yours – and adapting them can be difficult • the more comprehensive the stack, the more difficult it&apos;s going to be to understand it, and the more likely you are to overlook something, duplicate functionality with slightly different implementations, or introduce bugs or security holes
  7. The nice thing is that Node modules, being designed to do one thing, are generally easy to combine, making it fast to build an app that does what you need – and no more – in a reasonable amount of time.
  8. Node isn&apos;t omakase: it’s not an opinionated framework made up of curated components, optimized for a single use case
  9. nor is it a swiss-army chainsaw: it doesn’t try to do everything, and it’s not good at everything
  10. nor is it whatever the hell this is: Node eschews the abstract and formal in favor of getting things done [google “java abstract factory”]
  11. • it has a double handful of solid use cases, of which some are highly relevant to enterprise projects: • streaming: good for serving large files (GitHub’s use case for a couple years now) * multiplexing: lots of I/O on an economical amount of server (good for games!) • JSON APIs: good for talking to mobile and modern web clients * proxying: good for pulling together a complex back-end network (just look at Walmart) * soft realtime: presence notification and status notification
  12. • pretty much whatever legacy components you have to interoperate with have at least one module out there (except maybe tn3270 emulation) • Azure is already the second-largest cloud, it’s competitively priced (and MS invoices!), and MS is improving it all the time
  13. • Node tends to favor a style of simple composition: • code over configuration • inversion of control via callbacks or promises • direct dependency injection • one thing exported from one short file – you can reason about one whole small problem at a time
  14. • let’s look at some alternatives to the popular components in the MEAN stack • not judging, just showing some of the many different ways Node can be used to solve different engineering problems • choosing the best tool for the job rarely ends up being an objective process anyway
  15. Voxer uses it less than they did, but it was handling thousands of transactions per second for sustained periods of time.
  16. • driver is bare-bones, but that’s a feature — there are other modules for connection pools, ORM-like things • “time-tested” – legacy isn’t always a dirty word
  17. • explosively growing ecosystem, via npm • scale up or down as far as you want
  18. • hapi is still relatively new, but already in large-scale production use • plugged into all kinds of legacy systems, being used as a shim for mobile • grew out of Express, but was tailored to suit Walmart’s needs – a model for other enterprise projects
  19. • follows the same routing syntax, but has its own architecture • great for mobile apps [too cool for a logo]
  20. …and there’s always Geddy if you want something like Rails but smaller, simpler, and more conceptually unified than Sails.
  21. • ideology isn’t necessarily something you want to deal with when writing web apps, but it’s pretty par for the course with large frameworks like Angular or Ember • and browserify really isn’t a framework, it’s a module that glues components together, but it’s meant to be used (with lots of small browser modules) instead of Angular • flexible packaging pipeline without complex external tools
  22. • component is even less of a framework than browserify – not really about control flow and logic, more about putting widgets on a page • easy to use with another browser-hosted framework
  23. • yeoman is an impressive tool for client-oriented developers • focused on integrated workflow over integrated abstractions • not necessarily incompatible with a framework like Angular or Backbone, but not necessarily required, either
  24. • the point of this presentation is: consider your options, and use the right tool for the job • I really like Node – I’ve sunk more than two years of my life into working with it and making it better, pretty much 24/7 – but I’ll be the first to admit it’s not appropriate for everything • it’s easy to malign platforms like PHP and the JDK, but they have a lot of valuable things to offer • choose what you need to solve your problem, and try to design products to use it for what it’s best at