DevOps <3 node.js
github.com/miccolis | twitter.com/miccolis
SaaS DevOps
@mapbox
Not the kind of job where I expected to use javascript.
“Ah, right server side
javascript”
What is node.js again?
“Yea, cool so your front end devs can help,
and you can use the same libraries, and
probably even run all the same code on...
No.
Everyone’s first response to node.js
is wrong.
<html>
<body>
<script>
alert("Hello World");
</script>
</body>
</html>
<html>
<head>
<script src="jquery-1.2.6.min.js"></script>
</head>
<body>
<script>
$(document).ready(function(){
$("#mydiv"...
Most of that was DOM
$(document).ready()
...will be disregarded as just boilerplate.
It’s true, you can use
the same libraries.
They all expect async I/O
And build a framework
where the application can
run on the client or server!
https://github.com/developmentseed/bones
YMMV
It’s not what most people
expect, but there are good
parts.
Async I/O
Done the most simple way that could possibly work.
First class server
support
The node.js ‘hello world’ is a HTTP server,
in 6 lines.
A package manager
The best I’ve ever worked with.
The kinds of things that
make my life easier.
Node.js & C10K
1. Event loop & non-blocking I/O
2. Simple & direct API; `callback(err, ...)`
3. ?
4. Profit
Node.js & HTTP
• Any node.js program is a HTTP server (or
could become one with trivial effort).
• Your program is defined ...
Node.js & NPM
• Requires semantic versioning.
• Completely captures dependencies.
• Handles multiple instances of the same...
In practice
Building servers
• Lots of small projects
• Scale independently
• Varying lifecycles
Packaging
• Every commit hits CI testing
• Every commit is built into a deployable
“slug”
• Anything merged into `master` ...
Streamlined
deployment
• Main client-side application is automatically
deployed on every update to `master`.
• Other appli...
Because I need HTTP
servers that scale...
Why node.js?
...and a strong open source
community helping with
libraries.
Why node.js?
Thanks
Questions?
DevOps &lt;3 node.js
Upcoming SlideShare
Loading in …5
×

DevOps &lt;3 node.js

494 views
384 views

Published on

Pr

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

  • Be the first to like this

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

No notes for slide

DevOps &lt;3 node.js

  1. 1. DevOps <3 node.js github.com/miccolis | twitter.com/miccolis
  2. 2. SaaS DevOps @mapbox Not the kind of job where I expected to use javascript.
  3. 3. “Ah, right server side javascript” What is node.js again?
  4. 4. “Yea, cool so your front end devs can help, and you can use the same libraries, and probably even run all the same code on the server or the client, right? That’s great!” Everyone’s first response to node.js
  5. 5. No. Everyone’s first response to node.js is wrong.
  6. 6. <html> <body> <script> alert("Hello World"); </script> </body> </html>
  7. 7. <html> <head> <script src="jquery-1.2.6.min.js"></script> </head> <body> <script> $(document).ready(function(){ $("#mydiv").html("Hello World"); }); </script> <div id="mydiv"></div> </body> </html>
  8. 8. Most of that was DOM
  9. 9. $(document).ready() ...will be disregarded as just boilerplate.
  10. 10. It’s true, you can use the same libraries. They all expect async I/O
  11. 11. And build a framework where the application can run on the client or server! https://github.com/developmentseed/bones
  12. 12. YMMV
  13. 13. It’s not what most people expect, but there are good parts.
  14. 14. Async I/O Done the most simple way that could possibly work.
  15. 15. First class server support The node.js ‘hello world’ is a HTTP server, in 6 lines.
  16. 16. A package manager The best I’ve ever worked with.
  17. 17. The kinds of things that make my life easier.
  18. 18. Node.js & C10K 1. Event loop & non-blocking I/O 2. Simple & direct API; `callback(err, ...)` 3. ? 4. Profit
  19. 19. Node.js & HTTP • Any node.js program is a HTTP server (or could become one with trivial effort). • Your program is defined by its HTTP API, and can be tested as such. • Stateless, tested == rapidly deployable.
  20. 20. Node.js & NPM • Requires semantic versioning. • Completely captures dependencies. • Handles multiple instances of the same package with different versions. • Wildly inclusive.
  21. 21. In practice
  22. 22. Building servers • Lots of small projects • Scale independently • Varying lifecycles
  23. 23. Packaging • Every commit hits CI testing • Every commit is built into a deployable “slug” • Anything merged into `master` is considered production ready.
  24. 24. Streamlined deployment • Main client-side application is automatically deployed on every update to `master`. • Other applications can be deployed by any developer using a single CLI command.* * database cluster’s still require babysitting.
  25. 25. Because I need HTTP servers that scale... Why node.js?
  26. 26. ...and a strong open source community helping with libraries. Why node.js?
  27. 27. Thanks Questions?

×