• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
LJC 05/14 "Cloud Developer's DHARMA"
 

LJC 05/14 "Cloud Developer's DHARMA"

on

  • 692 views

Building applications for the IaaS Cloud is easy, right? "Sure, no problem - just lift and shift!" all the Cloud vendors shout in unison. However, the reality of building and deploying Cloud ...

Building applications for the IaaS Cloud is easy, right? "Sure, no problem - just lift and shift!" all the Cloud vendors shout in unison. However, the reality of building and deploying Cloud applications can often be different. This talk will introduce lessons learnt from the trenches during two years of designing and implementing cloud-based Java applications, which we have codified into our Cloud developer’s 'DHARMA' rules; Documented (just enough); Highly cohesive/loosely coupled (all the way down); Automated from code commit to cloud; Resource aware; Monitored thoroughly; and Antifragile.

We will look at these lessons from both a theoretic and practical perspective using a real-world case study from Instant Access Technologies (IAT) Ltd. IAT recently evolved their epoints.com(http://epoints.com/) customer loyalty platform from a monolithic Java application deployed into a data centre on a 'big bang' schedule, to a platform of loosely-coupled JVM-based components, all being continuously deployed into the AWS IaaS Cloud

Statistics

Views

Total Views
692
Views on SlideShare
289
Embed Views
403

Actions

Likes
0
Downloads
6
Comments
0

3 Embeds 403

http://www.iatltd.com 248
http://taidevcouk.wordpress.com 154
http://feedly.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Code doesn’t tell whole storycontext, containers, components and classes
  • James Gough’s “The benefits are more than just the tests”Mash Badar’s “TDD at Scale” (slidesha.re/19P7kzS)

LJC 05/14 "Cloud Developer's DHARMA" LJC 05/14 "Cloud Developer's DHARMA" Presentation Transcript

  • Cloud Developer’s DHARMA… redefining ‘done’ for Cloud applications Daniel Bryant CTO, Instant Access Technologies d.bryant@iatltd.com @danielbryantuk
  • Who is this guy? • My career so far… • Open source work • I enjoy coding… 07/05/2014 @danielbryantuk
  • @danielbryantuk07/05/2014
  • epoints.com 2012/13 Upgrade… @danielbryantuk07/05/2014 • Increasing traffic – Scalability being stretched • Increasingly diverse requirements • Our starting point – Developers creating monolithic application – Manual QA – Operations deploying to data center
  • Core Changes… • Service-Oriented Architecture • Cloud-based deployments • DevOps Culture @danielbryantuk07/05/2014
  • Core Changes… • Service-Oriented Architecture – Twitter’s Story (bit.ly/1j1WbmI) • Cloud-based deployments – Tonight! • DevOps Culture – Previous LJC Event (bit.ly/1elVPJz) @danielbryantuk07/05/2014
  • Moving to the Cloud • IAT chose Amazon Web Services (AWS) IaaS • IaaS was great, but… – Made a few mistakes – Learnt a lot of lessons • Bonus! Russ Miles view on PaaS – bit.ly/1neXzaf 07/05/2014 @danielbryantuk
  • Common Cloud Problems TL;DR… 07/05/2014 @danielbryantuk
  • @danielbryantuk07/05/2014
  • Common Cloud Problems • Components – Who does what now? – Configuration issues • Deployment topology – Cloud networking – “Is that DB local?” 07/05/2014 @danielbryantuk
  • Common Cloud Problems • Unknown failure modes – Bang! – Now you see me… – Can…you…hear…me?… – A to B, but not B to A 07/05/2014 @danielbryantuk
  • Common Cloud Problems • High Availability (HA) – Self-inflicted wounds… • Snowflake servers • Monitoring / Diagnostics 07/05/2014 @danielbryantuk
  • Common Cloud Problems • Not respecting the underlying hardware • Not testing in the Cloud – Here be dragons! 07/05/2014 @danielbryantuk
  • We’ve created a “Cloud Developer’s DHARMA” to act as a checklist when building Cloud apps 07/05/2014 @danielbryantuk
  • dharma /ˈdɑˈmə,ˈdəˈmə/ noun 1. Signifies behaviors that are considered to be in accord with order that makes life and universe possible (Hinduism) 2. "cosmic law and order”, but is also applied to the teachings of the Buddha (Buddhism) 07/05/2014 @danielbryantuk
  • Documented (just enough) Highly cohesive/loosely coupled (all the way down) Automated from commit to Cloud Resource aware Monitored thoroughly Antifragile 07/05/2014 @danielbryantuk
  • Documented (just enough) Highly cohesive/loosely coupled (all the way down) Automated from commit to Cloud Resource aware Monitored thoroughly Antifragile 07/05/2014 @danielbryantuk
  • 07/05/2014 @danielbryantuk
  • 07/05/2014 @danielbryantuk07/05/2014 @danielbryantuk
  • Documentation (just enough) • Create a Wiki • Simon Brown’s C4 Model – bit.ly/StVpa4 • Architectural ‘views’ • Open Source style README.md
  • Documented (just enough) Highly cohesive/loosely coupled (all the way down) Automated from commit to Cloud Resource aware Monitored thoroughly Antifragile 07/05/2014 @danielbryantuk
  • High Cohesion / Loose Coupling (all the way down…) • Code • Architecture – Components – Services • Public API – PayPal (bit.ly/1hnZNly) 07/05/2014 @danielbryantuk
  • Documented (just enough) Highly cohesive/loosely coupled (all the way down) Automated from commit to Cloud Resource aware Monitored thoroughly Antifragile 07/05/2014 @danielbryantuk
  • Automated from Commit to Cloud 07/05/2014 @danielbryantuk • Continuous Integration • Continuous Deployment • Continuous Delivery
  • Our Build Pipeline Jenkins, with plugins… • Build Pipeline – wiki.jenkins-ci.org/display/JENKINS/Build+Pipeline+Plugin • Parameterized build – wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build • Promoted Builds Plugin – wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin 07/05/2014 @danielbryantuk
  • Our Build Pipeline • Component Build – Compile – Unit Tests (surefire) – Integration Tests (failsafe) • Deployment onto QA Cloud – Python Scripts + Chef to provision – Verify success using Python 07/05/2014 @danielbryantuk
  • Our Build Pipeline • Acceptance Tests – Cucumber and Selenium – Work in progress… • Performance Tests – Jmeter – Jenkins Jmeter performance plugin • Live Deployment – “Human-based conditional operation” 07/05/2014 @danielbryantuk
  • Automating QA • Intra-component integration testing – Spock is awesome (code.google.com/p/spock) – Utilise embedded datastore/middleware • Inter-component integration testing – The hardest part of SOA… • Consumer-based Testing – Brandon Byars (bit.ly/1lmcoaD) 07/05/2014 @danielbryantuk
  • Infrastructure: Say No To Snowflakes! • Automate all provisioning – Chef, Puppet, SaltStack – Bash, Python – AWS API / CLI • “Infrastructure as Code” – Version control everything 07/05/2014 @danielbryantuk
  • Infrastructure: Say No To Snowflakes! • Doing “Proper Development” – Gareth Rushgrove at Craft Conf (bit.ly/1njuc49) – Chef Conf (www.youtube.com/user/getchef) • Local tooling/testing – Vagrant (www.vagrantup.com) – Docker (www.docker.io) 07/05/2014 @danielbryantuk
  • Documented (just enough) Highly cohesive/loosely coupled (all the way down) Automated from commit to Cloud Resource aware Monitored thoroughly Antifragile 07/05/2014 @danielbryantuk
  • Deployment Platform: What you’ve got… 07/05/2014 @danielbryantuk
  • What you think you want… 07/05/2014 @danielbryantuk
  • What you get… 07/05/2014 @danielbryantuk Fact: 9 out of 10 cheetahs prefer the taste of an Ops team over tinned food
  • Thou Shalt Know thy Cloud… • AWS EBS 100 IOPS (by default) – My Mac SSD does 49K IOPS • 1000Mbps network max transfer ~125MB/s – My Mac does 400+ MB/s Sequential Write to SSD • “Noisy *virtual+ Neighbours” Reference for Mac statistics: bit.ly/1ftJZH8 07/05/2014 @danielbryantuk
  • Thinking/Acting Operationally • Cultivate “Mechanical Sympathy” • Virtualisation – Tech Target (bit.ly/1kDVqyG) • Networking – ‘Unix and Linux System Administration Handbook’ – aws.amazon.com/documentation 07/05/2014 @danielbryantuk
  • Thinking/Acting Operationally • Learn Linux fundamentals • Diagnostic skills – top, netstat, vmstat, tcpdump – Java utils: jps, jstat, jmap, jhat – “DevOps Troubleshooting” by K. Rankin • Maybe grow a beard… 07/05/2014 @danielbryantuk
  • Documented (just enough) Highly cohesive/loosely coupled (all the way down) Automated from commit to Cloud Resource aware Monitored thoroughly Antifragile 07/05/2014 @danielbryantuk
  • Monitor All The Things! • Infrastructure monitoring – Nagios – Zabbix – Splunk – AppDynamics • Distributed Tracing – twitter.github.io/zipkin 07/05/2014 @danielbryantuk
  • Component Metrics 07/05/2014 @danielbryantuk • Dropwizard’s Metrics – metrics.codahale.com • Netflix’s Servo – github.com/Netflix/servo • Etsy’s StatsD – github.com/etsy/statsd/wiki
  • Gauges, Counters, Meters, Timers… 07/05/2014 @danielbryantuk
  • Graph It! 07/05/2014 @danielbryantuk
  • 07/05/2014 @danielbryantuk
  • 07/05/2014 @danielbryantuk
  • Health Checks 07/05/2014 @danielbryantuk
  • Documented (just enough) Highly cohesive/loosely coupled (all the way down) Automated from commit to Cloud Resource aware Monitored thoroughly Antifragile 07/05/2014 @danielbryantuk
  • Antifragile • The opposite of fragile? – Robust… – Antifragile… • Netflix are best-in-class – bit.ly/1gs5n3q • System must be robust first! 07/05/2014 @danielbryantuk
  • Design for Failure • Design patterns – Timeouts / retries – Bulkheads / circuit-breakers • Inspiration – Chris Richardson (slidesha.re/1ft3vsg) – Netflix (bit.ly/1h5GMid) 07/05/2014 @danielbryantuk
  • Retries 07/05/2014 @danielbryantuk https://github.com/rholder/guava-retrying
  • Circuit-breaker 07/05/2014 @danielbryantuk https://github.com/Netflix/Hystrix
  • Robust in the Cloud • Distributed Computing Principles – ‘For young bloods’ (bit.ly/1pKVepz) • “Multi-AZ” 07/05/2014 @danielbryantuk
  • Robust in the Cloud 07/05/2014 @danielbryantuk
  • Robust in the Cloud • Careful caching… • Make apps “Cluster-aware” – MongoDB – SolrCloud – RabbitMQ 07/05/2014 @danielbryantuk
  • Real Antifragility • Autoscaling 07/05/2014 @danielbryantuk
  • Antifragile Patterns • Stateless components • Distributed data stores / caches 07/05/2014 @danielbryantuk
  • Antifragile Patterns • Eventual consistency • Asynchronous communication 07/05/2014 @danielbryantuk http://cloudshankar.blogspot.co.uk/2013/05/eventual-consistency.html
  • Documented (just enough) Highly cohesive/loosely coupled (all the way down) Automated from commit to Cloud Resource aware Monitored thoroughly Antifragile 07/05/2014 @danielbryantuk So, Cloud Apps are ‘done’ when…
  • Thanks For Listening • Massive thanks to all the IAT team! • Questions / comments? – d.bryant@iatltd.com – @danielbryantuk • Join us at Devoxx UK! – www.devoxx.co.uk 07/05/2014 @danielbryantuk