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

Moving fast with Node.js at the BBC

Robin Murphy
November 17, 2015

Moving fast with Node.js at the BBC

Presented at Enterprise.js Boston.

https://enterprisejs.io/events-boston001/

Robin Murphy

November 17, 2015
Tweet

More Decks by Robin Murphy

Other Decks in Technology

Transcript

  1. HOW DO YOU MOVE WITH THE SPEED OF A STARTUP

    IN AN ENTERPRISE ENVIRONMENT?
  2. HOW DO YOU MOVE WITH THE SPEED OF A STARTUP

    IN AN ENTERPRISE ENVIRONMENT?
  3. WRITE CODE COMMIT JENKINS BUILD DEPLOY TO INT DEPLOY TO

    TEST RAISE TICKET ACCEPTANCE TESTS
  4. WRITE CODE COMMIT JENKINS BUILD DEPLOY TO INT DEPLOY TO

    TEST RAISE TICKET DEPLOY TO STAGE ACCEPTANCE TESTS
  5. WRITE CODE COMMIT JENKINS BUILD DEPLOY TO INT DEPLOY TO

    TEST RAISE TICKET DEPLOY TO STAGE LOAD TEST ACCEPTANCE TESTS
  6. WRITE CODE COMMIT JENKINS BUILD DEPLOY TO INT DEPLOY TO

    TEST RAISE TICKET DEPLOY TO STAGE LOAD TEST RAISE TICKET ACCEPTANCE TESTS
  7. WRITE CODE COMMIT JENKINS BUILD DEPLOY TO INT DEPLOY TO

    TEST RAISE TICKET DEPLOY TO STAGE LOAD TEST RAISE TICKET ACCEPTANCE TESTS DEPLOY TO LIVE
  8. WRITE CODE COMMIT JENKINS BUILD DEPLOY TO INT DEPLOY TO

    TEST RAISE TICKET DEPLOY TO STAGE LOAD TEST RAISE TICKET ACCEPTANCE TESTS DEPLOY TO LIVE MANUAL
  9. CLIENT API { "foo": "bar" } THE STATUS CODE SHOULD

    BE 200 THE FOO PROPERTY SHOULD BE BAR
  10. { "login": "robinjmurphy", "id": 917111, "avatar_url": "https://avatars.githubusercontent.com/u/917111?v=3", "gravatar_id": "", "url":

    "https://api.github.com/users/robinjmurphy", "html_url": "https://github.com/robinjmurphy", "followers_url": "https://api.github.com/users/robinjmurphy/followers", "following_url": "https://api.github.com/users/robinjmurphy/following{/other_user}", "gists_url": "https://api.github.com/users/robinjmurphy/gists{/gist_id}", "starred_url": "https://api.github.com/users/robinjmurphy/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/robinjmurphy/subscriptions", "organizations_url": "https://api.github.com/users/robinjmurphy/orgs", "repos_url": "https://api.github.com/users/robinjmurphy/repos", "events_url": "https://api.github.com/users/robinjmurphy/events{/privacy}", "received_events_url": "https://api.github.com/users/robinjmurphy/received_events", "type": "User", "site_admin": false, "name": "Robin Murphy", "company": "BBC", "blog": "https://www.robinmurphy.co.uk", "location": "London, UK", "email": "[email protected]", "hireable": null, "bio": null, "public_repos": 35, "public_gists": 3, "followers": 30, "following": 35, "created_at": "2011-07-15T07:55:17Z", "updated_at": "2015-11-03T10:23:49Z" } “THE API”
  11. var Contract = require('consumer-contracts').Contract; module.exports = new Contract({ name: 'Get

    user details', consumer: 'GitHub stats web page', request: { method: 'GET', url: 'https://api.github.com/users/robinjmurphy' }, // ... });
  12. var Contract = require('consumer-contracts').Contract; module.exports = new Contract({ name: 'Get

    user details', consumer: 'GitHub stats web page', request: { method: 'GET', url: 'https://api.github.com/users/robinjmurphy' }, response: { statusCode: 200, // ... } });
  13. var Contract = require('consumer-contracts').Contract; var Joi = require('consumer-contracts').Joi; module.exports =

    new Contract({ name: 'Get user details', consumer: 'GitHub stats web page', request: { method: 'GET', url: 'https://api.github.com/users/robinjmurphy' }, response: { statusCode: 200, body: Joi.object().keys({ login: Joi.string(), name: Joi.string(), public_repos: Joi.number().integer() }) } });
  14. { login: "robinjmurphy", name: "Robin Murphy", public_repos: 16 } CONTRACT

    RESPONSE body: Joi.object().keys({ login: Joi.string(), name: Joi.string(), public_repos: Joi.number().integer() })
  15. { login: "robinjmurphy", name: "Robin Murphy", public_repos: 16 } CONTRACT

    RESPONSE body: Joi.object().keys({ login: Joi.string(), name: Joi.string(), public_repos: Joi.number().integer() })
  16. { login: "robinjmurphy", name: "Robin Murphy", public_repos: 16 } CONTRACT

    RESPONSE body: Joi.object().keys({ login: Joi.string(), name: Joi.string(), public_repos: Joi.number().integer() })
  17. { login: "robinjmurphy", name: ["Robin", "Murphy"], public_repos: 16 } body:

    Joi.object().keys({ login: Joi.string(), name: Joi.string(), public_repos: Joi.number().integer() }) CONTRACT RESPONSE
  18. { login: "robinjmurphy", name: ["Robin", "Murphy"], public_repos: 16 } body:

    Joi.object().keys({ login: Joi.string(), name: Joi.string(), public_repos: Joi.number().integer() }) CONTRACT RESPONSE
  19. COMMIT JENKINS BUILD DEPLOY TO TEST DEPLOY TO LIVE TDD

    REAL-TIME MONITORING CONSUMER CONTRACTS CONSUMER CONTRACTS