SlideShare ist ein Scribd-Unternehmen logo
1 von 19
A Love Story: Presented in II acts Shane Hansen Software Engineer Whitane Technologies, LLC
Shane Hansen Utah based Software Engineer Likes it when things are easy
[object Object],[object Object],[object Object],[object Object]
 
[object Object],[object Object],[object Object]
[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
[object Object],[object Object],[object Object],[object Object],[object Object]
 
 
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Want cruft free url routing?
Want  to use web sockets now?
Want truly real time analytics? Gilt.com does.
Want to make some money as an amazon affiliate?
Want to leverage existing javascript frameworks?

Weitere ähnliche Inhalte

Ähnlich wie Rapid Application with Node.js

From DevOps to NoOps how not to get Equifaxed Apidays
From DevOps to NoOps how not to get Equifaxed ApidaysFrom DevOps to NoOps how not to get Equifaxed Apidays
From DevOps to NoOps how not to get Equifaxed ApidaysOri Pekelman
 
Functional node.js
Functional node.jsFunctional node.js
Functional node.jsCarob Cherub
 
Semantic web, python, construction industry
Semantic web, python, construction industrySemantic web, python, construction industry
Semantic web, python, construction industryReinout van Rees
 
NDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business NeedsNDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business NeedsTorben Hoffmann
 
Fixing security by fixing software development
Fixing security by fixing software developmentFixing security by fixing software development
Fixing security by fixing software developmentNick Galbreath
 
Top 10 Scalability Mistakes
Top 10 Scalability MistakesTop 10 Scalability Mistakes
Top 10 Scalability MistakesJohn Coggeshall
 
Securing a Great Developer Experience - DevOps Indonesia Meetup by Stefan Str...
Securing a Great Developer Experience - DevOps Indonesia Meetup by Stefan Str...Securing a Great Developer Experience - DevOps Indonesia Meetup by Stefan Str...
Securing a Great Developer Experience - DevOps Indonesia Meetup by Stefan Str...DevOps Indonesia
 
Software and the Concurrency Revolution : Notes
Software and the Concurrency Revolution : NotesSoftware and the Concurrency Revolution : Notes
Software and the Concurrency Revolution : NotesSubhajit Sahu
 
Natural Laws of Software Performance
Natural Laws of Software PerformanceNatural Laws of Software Performance
Natural Laws of Software PerformanceGibraltar Software
 
LanceShivnathHadoopSummit2015
LanceShivnathHadoopSummit2015LanceShivnathHadoopSummit2015
LanceShivnathHadoopSummit2015Lance Co Ting Keh
 
Why you shouldnt use django for that
Why you shouldnt use django for thatWhy you shouldnt use django for that
Why you shouldnt use django for thatIván Stepaniuk
 
Squeak & Pharo @ NYC Smalltalk
Squeak & Pharo @ NYC SmalltalkSqueak & Pharo @ NYC Smalltalk
Squeak & Pharo @ NYC SmalltalkSeanDeNigris
 
Erlang
ErlangErlang
ErlangESUG
 
Matt carroll - "Security patching system packages is fun" said no-one ever
Matt carroll - "Security patching system packages is fun" said no-one everMatt carroll - "Security patching system packages is fun" said no-one ever
Matt carroll - "Security patching system packages is fun" said no-one everDevSecCon
 
We've being shifting
We've being shiftingWe've being shifting
We've being shiftingpaulosuzart
 
Stream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationStream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationstreambase
 
Faster Secure Software Development with Continuous Deployment - PH Days 2013
Faster Secure Software Development with Continuous Deployment - PH Days 2013Faster Secure Software Development with Continuous Deployment - PH Days 2013
Faster Secure Software Development with Continuous Deployment - PH Days 2013Nick Galbreath
 
DevOps and the Death & Rebirth of Childhood Innocence
DevOps and the Death & Rebirth of Childhood InnocenceDevOps and the Death & Rebirth of Childhood Innocence
DevOps and the Death & Rebirth of Childhood InnocenceRobert Douglass
 

Ähnlich wie Rapid Application with Node.js (20)

From DevOps to NoOps how not to get Equifaxed Apidays
From DevOps to NoOps how not to get Equifaxed ApidaysFrom DevOps to NoOps how not to get Equifaxed Apidays
From DevOps to NoOps how not to get Equifaxed Apidays
 
Functional node.js
Functional node.jsFunctional node.js
Functional node.js
 
Semantic web, python, construction industry
Semantic web, python, construction industrySemantic web, python, construction industry
Semantic web, python, construction industry
 
NDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business NeedsNDC London 2014: Erlang Patterns Matching Business Needs
NDC London 2014: Erlang Patterns Matching Business Needs
 
Fixing security by fixing software development
Fixing security by fixing software developmentFixing security by fixing software development
Fixing security by fixing software development
 
Top 10 Scalability Mistakes
Top 10 Scalability MistakesTop 10 Scalability Mistakes
Top 10 Scalability Mistakes
 
Securing a Great Developer Experience - DevOps Indonesia Meetup by Stefan Str...
Securing a Great Developer Experience - DevOps Indonesia Meetup by Stefan Str...Securing a Great Developer Experience - DevOps Indonesia Meetup by Stefan Str...
Securing a Great Developer Experience - DevOps Indonesia Meetup by Stefan Str...
 
Software and the Concurrency Revolution : Notes
Software and the Concurrency Revolution : NotesSoftware and the Concurrency Revolution : Notes
Software and the Concurrency Revolution : Notes
 
My_CV(1)
My_CV(1)My_CV(1)
My_CV(1)
 
Natural Laws of Software Performance
Natural Laws of Software PerformanceNatural Laws of Software Performance
Natural Laws of Software Performance
 
LanceShivnathHadoopSummit2015
LanceShivnathHadoopSummit2015LanceShivnathHadoopSummit2015
LanceShivnathHadoopSummit2015
 
Why you shouldnt use django for that
Why you shouldnt use django for thatWhy you shouldnt use django for that
Why you shouldnt use django for that
 
Squeak & Pharo @ NYC Smalltalk
Squeak & Pharo @ NYC SmalltalkSqueak & Pharo @ NYC Smalltalk
Squeak & Pharo @ NYC Smalltalk
 
Erlang
ErlangErlang
Erlang
 
Matt carroll - "Security patching system packages is fun" said no-one ever
Matt carroll - "Security patching system packages is fun" said no-one everMatt carroll - "Security patching system packages is fun" said no-one ever
Matt carroll - "Security patching system packages is fun" said no-one ever
 
TxJS 2011
TxJS 2011TxJS 2011
TxJS 2011
 
We've being shifting
We've being shiftingWe've being shifting
We've being shifting
 
Stream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationStream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentation
 
Faster Secure Software Development with Continuous Deployment - PH Days 2013
Faster Secure Software Development with Continuous Deployment - PH Days 2013Faster Secure Software Development with Continuous Deployment - PH Days 2013
Faster Secure Software Development with Continuous Deployment - PH Days 2013
 
DevOps and the Death & Rebirth of Childhood Innocence
DevOps and the Death & Rebirth of Childhood InnocenceDevOps and the Death & Rebirth of Childhood Innocence
DevOps and the Death & Rebirth of Childhood Innocence
 

Rapid Application with Node.js

Hinweis der Redaktion

  1. I’m Shane Hansen, a software engineer here in Salt Lake. By day I run a team of engineers doing j2ee for Backcountry.com, an online etailer.
  2. Chances are you won’t get your product right the first time. If you can decrease the cost of an iteration, you can save a lot of wasted money. Being first to market can be worth a lot.
  3. Lets not forget the most important part, RAD let developers have more fun developing. I say this in all seriousness, if you aren’t having fun developing, you will not be great.
  4. The web is doing I/O wrong. This is a graph showing the execution path of a typical request in ecommerce land. What’s the process doing while the database is loading the product data? Jack shit, that’s what. We can do better, and we’re not alone. The right way to handle this is to parallelize and create an execution graph that mirrors the dependency graph. Parallelization is easy on modern hardware, but we lack good infrastructure (languages and libraries) to simply express our intent. Facebook created tornado, a high level asynchronous framework for making remote service requests.
  5. Here’s a picture of what our execution graph should look like. We receive a request, Fetch the reviews and products in parallel, process the results and return the request. Our problem now becomes, “how can we transparently handle concurrenct in database calls, web services calls, and I/O “ to achive this?
  6. The venerable fork syscall has been the workhorse of concurrency for a long time. Apache, CGI, postgres just to name a few technologies that use this sort of model to handle concurrency. It works well when your worker threads are largely independent. Becomes an order of magnitude more complex if you have to share data between processes.
  7. For those who don’t know, threads of execution share the same address space and therefore the same data structures, but don’t have the same stack. For our point of view today, threads are not the most efficient concurrency mechanism we can use, and they are frankly a lot harder to use correctly than people give them credit for.
  8. Technologies like epoll and select start to get more esotoric. The basic idea behind epoll is that you register a set of events you’re interested in (client a is ready for data, the database query is done, etc) and let the kernel tell you when the events are occurring. This is the approach Node.js takes, and the foundation of it’s crazy scalability. By leveraging epoll and event loops, a single node.js process can service thousands of concurrent clients.
  9. Javascript has been called the worlds most misunderstood language. You can’t really understand javascript until you understand why variables, object propertys, and hash’s are basically the same thing… except when they’re not. Javascript has no apis of it’s own, the host provides objects to expose any apis. Javascript was originally deployed in browsers, and for reasons I don’t fully understand the execution of web page javascript seems to share the same thread as the ui in all major browsers which had the happy accident of forcing javascript and browser developers to build everything using asynchronous apis. AJAX anyone? Javascript is becoming the universal scripting language, from the browser to the JVM to photoshop to cross platform libraries like Qt and Gnome, javascript can be used to glue components together, and provide ways for users to customize and extend the platforms they are using. Node uses an implementation of javascript written by google for extreme performance. They stole one of the java hot spot JIT gurus and built a “compiler” for javascript that goes straight from the parse tree to machine code.
  10. And now, we’ve arrived at what node is and the problems it solves. A framework for building scalable and highly concurrent applications. Node.js is based on google’s V8 javascript engine, and has an integrated event loop baked deep into the core of the framework to handle file and socket I/O.
  11. And now, we’ve arrived at what node is and the problems it solves. A framework for building scalable and highly concurrent applications. Node.js is based on google’s V8 javascript engine, and has an integrated event loop baked deep into the core of the framework to handle file and socket I/O.
  12. Of course, I’ve just explained how easy it is to build scalable apps on node, but I haven’t explained how you’re going To get your apps built any faster. Well, a funny thing happened to node in the last year and a half. It’s community caught Fire and started pumping out libraries and tools like there’s no tomorrow. There’s over 2k projects on github tagged with node.js And over 500 packages installable via node package manager including xml parsing, datbase drivers, application server middleware, and testing frameworks to name a very few.
  13. Express is a sinatra like framework for controlling url and application routing. It utilizes the larger Connect middleware framework. It provides cruft free url routing.
  14. Socket-io is a cross browser library for full bidirectional low latency communication. It utilizes Websockets when available and progressively degrades to flash sockets, ajax long polling, etc. This is the guts of a browser based chat application. Socket-io is writeen by Guillermo, a friend of a friend.
  15. Real time web analytics. I might have led you to believe I was going to show you how to build one Of these on node.js, that was before I discovered someone beat me to the punch. Go node.js and the gilt group for contributing to this project.
  16. The amazon product api provides a way to build online stores. The entire search, browse, and cart api for amazon is exposed via soap webservices which node-apac can consume. Thanks Dustin McQuay!
  17. The YUI library provides apis and classes for event buses, dom manipulation, html generation, testing, ajax, Internationalization, even YQL (yahoo query language) integration.