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

Zero to Microservices

Zero to Microservices

Mark Wolfe

April 07, 2015
Tweet

More Decks by Mark Wolfe

Other Decks in Programming

Transcript

  1. Overview • Martin Fowler Micro Services • Application is a

    suite of small services • communicate with lightweight mechanisms, often REST
  2. 12 Factor Apps • Store config in the environment •

    Treat backing services as attached resources • Execute the app as one or more stateless processes
  3. Where do we start? • From the API end •

    Build the API you want to talk too • Use the API as the basis for your service • Re use the API as the interface to your Datastore
  4. Do we need to build all this? • Locate similar

    open source projects • Review Licence • Build on their foundation • Read a lot of Code • Start small and work your way up
  5. Implementation: DRY’er • No frameworks • Use interfaces • High

    quality API Client as a side affect • Sharing parameter structs between layers
  6. In Review • Learnt a ton building both the buildkite

    and assembly prototype • Need to replace the http.Handler routines with negoni + middleware + authentication anyone?! • Lots of things to rejig around that (delete some code). • Move some of the test helpers out into a library
  7. Links • 12 Factor Applications • assembly - REST API

    based on this talk • go-buildkite - Client API build using a similar model • thesrc - A bigger example by sourcegraph • go-sourcegraph - Client API also using this model