Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Node.js & Microservices

Node.js & Microservices

Part One
Javascript, a love/hate language for some. It is our only choice for client side programming which has has seen a rise in recent years, but JavaScript is also a successful server side language too. Simon will cover why the asynchronous nature of Node.js works well server side and the strengths and weaknesses of Node.js as a choice for building large scale solutions.

Part Two
Microservices are a hot topic among the silicon valley startups, but why are we seeing Uber, Netflix and others turn their backs on monolithic web applications and turn to microservices as a solution? Simon will talk about the journey Holiday Extras are undergoing in moving from a single large server side e-commerce solution to small single responsibility services. He will explain why Holiday Extras believe this is the right route to take, and the challenges we have faced so far on this journey.

Simon Wood

April 06, 2017
Tweet

More Decks by Simon Wood

Other Decks in Technology

Transcript

  1. @hpoom 8 "JavaScript: Good Parts vs. The Rest" by Nathan

    Smith. Licensed under Creative Commons.- https://flic.kr/p/8aGB5o
  2. @hpoom 9 Math.min() < Math.max(); // false typeof NaN; //

    “number” typeof null; // ”object” null instanceof Object; // false 0.1 + 0.2 == 0.3; // false
  3. @hpoom 31 asyncCall().then(function(data1){ // do something... return anotherAsyncCall(); }).then(function(data2){ //

    do something... return oneMoreAsyncCall(); }).then(function(data3){ // the third and final async response }).fail(function(err) { // handle any error from any of the above calls }).done();
  4. @hpoom 38 var express = require('express'); var app = express();

    var globalCount = 0; app.get('/', function (req, res) { var localCount = 0; globalCount++; localCount++; res.send('You visited #' + localCount + ' times! Total visits #' + globalCount); }); app.listen(8080);
  5. @hpoom 39 You visited #1 times! Total visits #1 You

    visited #1 times! Total visits #2 You visited #1 times! Total visits #3 You visited #1 times! Total visits #4 You visited #1 times! Total visits #5
  6. @hpoom 41 1.Close the server to stop accepting new connections.

    2.Wait for existing connections to finish and close normally. 3.Only exit the process once all clients have finished and disconnected happily. 4.Failsafe: before starting the shutdown, it’s advisable to set an exit time limit. If the shutdown hangs or takes too long, something else is probably wrong so exit the process anyway.
  7. ” @hpoom Small Autonomous services that work together, modelled around

    a business domain. Sam Newman "Sam Newman" by Gavin Bell. Licensed under Creative Commons.- https://flic.kr/p/LEwhq
  8. / @hpoom pros 59 • Independently Scaleable • High Testability

    • Technology Diversity • Independently Deployable • Less People Dependency
  9. / @hpoom cons 60 • Increased Complexity • Operational Challenges

    • Performance Hit • Eventual Consistency • Service Discovery Essential
  10. ” @hpoom Any organization that designs a system … will

    inevitably produce a design whose structure is a copy of the organization's communication structure. Melvin Conway
  11. ” @hpoom If you can’t feed a team with two

    pizzas, it’s too large. Jeff Bezos "Etech05: Jeff" by James Duncan Davidson. Licensed under Creative Commons.- https://flic.kr/p/zYCD
  12. / @hpoom benefit of pods 69 • Autonomous • Simpler

    Communications • Fully Accountable • Velocity
  13. ” @hpoom If Engineering at Etsy has a religion, it’s

    the Church of Graphs. If it moves, we track it. Sometimes we’ll draw a graph of something that isn’t moving yet, just in case it decides to make a run for it. Code as Craft "Etsy" by KnitSpirit. Licensed under Creative Commons.- https://flic.kr/p/btwyFm
  14. / @hpoom Sumo Logic sumologic.com Cloud logging solutions 75 Logstash

    elastic.co/products/logstash Loggly loggly.com
  15. / @hpoom Correlation ids 78 Website API Create ID: xyz8942

    xyz8942 xyz8942 xyz8942 xyz8942 xyz8942
  16. ” @hpoom We want to empower developers to repeatedly deploy

    fast and often at scale. Removing the need for IT Infrastructure setup to get code into production. Andy Britcliffe
  17. ” @hpoom We want to empower our engineers to deliver

    software consistently, reliably and with minimal friction. Uber
  18. ” @hpoom When stitched together and analysed appropriately, a deluge

    of data suddenly becomes actionable knowledge and insight that marketers can act upon to maintain a personal connection with their customers. Lisa Gilbert "Virginia Tech - data center" by Christopher Bowns. Licensed under Creative Commons.- https://flic.kr/p/4Fnm8M
  19. @hpoom Thank you please contact me if you have any

    questions Twitter: @hpoom logo 114 By Simon Wood