Your SlideShare is downloading. ×
0
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Iterate Like a Whirling Dervish
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Iterate Like a Whirling Dervish

8,063

Published on

Continuous deployment is a a process that allows companies to release software in minutes instead of days, weeks, or months. …

Continuous deployment is a a process that allows companies to release software in minutes instead of days, weeks, or months.

Pascal-Louis Perez will describe how to use continuous deployment to iterate so fast that you run circles around the competition. He will cover the high level concepts as well as the nitty gritty details including examples from the continuous deployment system that he and his team developed at KaChing.

Pascal-Louis is the VP of Engineering and CTO at KaChing, where he practices continuous deployment continuously.

He previously worked at Google and holds a Master's degree in Computer Science from Stanford University.

Published in: Technology
2 Comments
33 Likes
Statistics
Notes
No Downloads
Views
Total Views
8,063
On Slideshare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
0
Comments
2
Likes
33
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Continuous Deployment at kaChing<br />#leanstartup<br />
  • 2. “Connect investors with outstandinginvestment managers”<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 3. Pascal-Louis Perez, kaChing Group Inc.<br />Assets Managed by Mutual Funds in the US<br />$11,000,000,000,000<br />
  • 4. Pivot<br />Our vision of bringing the quality of Ivy League Endowment management to retail is unaltered<br />Powering a marketplace where customers entrust high end managers with their money in separately managed accounts. We are SEC &amp; FINRA regulated.<br />Three years ago, kaChing was a fantasy stock trading app for young adults on facebook. Our strategy was to create an eco system where avid amateurs could rise through the ranks and make it to pro league.<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 5. Constant tension between product and development.<br />Right architecture only in the context of how it is used. Initially, you don’t know for sure how something will be used!<br />We’ve adopted proportional investing<br />Build cheap<br />When you spend X hours of time fixing problems<br />Spend a corresponding X hours improving the feature<br />Pascal-Louis Perez, kaChing Group Inc.<br />Build “Right”<br />Features<br />
  • 6. Strive for 80% of the value for 20% of the cost<br />Realize that 80% of what you build will go to waste. Validate before investing more time!<br />Pascal-Louis Perez, kaChing Group Inc.<br />80/20<br />
  • 7. Errors Are Costly!<br />Continuous Deployment is a mission critical way of running our business which provides tremendous value<br />Errors are costly<br />Brand impact<br />SLA penalties<br />And when you’re regulated, there’s also liabilities<br />Turning the wheels on the software with high confidence provides tremendous business value<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 8. Deploy Fast and Often<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 9. What is Continuous Deployment?<br />Continuous, successful and repeatable methodology to deploying code<br />Automates every steps of taking checked in code and making it run on production servers, used by customers<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 10. e.g. Twenty Deployments a Day<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 11. Release is a Marketing ConcernReducing Code Inventory is Engineering’s Job<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 12. Homage to Gursky: &apos;Kirksky‘copyright 2010 by Kirk Crippens<br />Supermarket Analogy<br />(Think Safeway)<br />You don’t close the store to fill the shelves!<br />Continuously get fresh merchandise out<br />For product releases, simply close or hide the aisle<br />
  • 13. Traditional Release Organization<br />Software organized as a tree<br />Trunk is what goes on production, it is The Truth<br />Engineers work on features in branches<br />Features get integrated into trunk<br />Release train on regular cyclic period<br />QA ensures correctness of each train<br />P1 bugs get patched back into the train<br />Flip the switch release<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 14. Timeline<br />Pascal-Louis Perez, kaChing Group Inc.<br />QA<br />Stage<br />Release<br />Fix P1 Bugs<br />Development<br />Cut a Release<br />Integrate Patches<br />1-4 Weeks<br />
  • 15. Timeline, Revisited<br />Pascal-Louis Perez, kaChing Group Inc.<br />Deployment<br />Automated<br />QA<br />Stage<br />Fix P1 Bugs<br />Release<br />Development<br />or Testing<br />Cut a Release<br />Integrate Patches<br />Monitoring<br />Experiments<br />5-10 Minutes<br />
  • 16. Experiments<br />Split features which are not finished“if press person, show the new home page”if (isInExperiment(NEW_HOME_PAGE)) { …} else { …}<br />Pascal-Louis Perez, kaChing Group Inc.<br />(Yes, this is just like A/B Testing)<br />
  • 17. True Story<br />Investment managers calls, comments about unintuitive trading flow.<br />Improvements are made, and deployed within the next 20 minutes.<br />We call him back “What do you think of the improvement?”<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 18. Benefits of Continuous Deployment<br />It allows quick iterations<br />Obsoletes processes, e.g. “cutting a release”<br />Reduces risk<br />Everyone is aware of production<br />No one throws code over the wall<br />Exposes 24x7 operational requirements<br />Trunk stable<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 19. Continuous Deployment<br />ImmuneSystem<br />Culture<br />ContinuousIntegration<br />Pascal-Louis Perez, kaChing Group Inc.<br />Test DrivenDevelopment<br />
  • 20. kaChing’s Architecture<br />Service oriented system<br />Vertical sharding<br />Everything uses the same platform kawala<br />Coordination using ZooKeeper<br />Data interchange using JSON and Protobufs<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 21. Typical Stack<br />Clustered services, multiple instances<br />Replicated databases (e.g. MySQL, Redis, …)<br />Caching (e.g. memcached)<br />Denormalized data (e.g. Voldemort)<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 22. Timeline, Revisited<br />Pascal-Louis Perez, kaChing Group Inc.<br />Development<br />Deployment<br />Testing<br />Monitoring<br />
  • 23. Development<br />Trunk stable<br />Small, frequent commits<br />Unreleased features live behind experiments<br />Forward &amp; Backward compatibility<br />Responsive code review<br />Pair difficult problems<br />Trivial rollbacks<br />
  • 24. Testing Philosophy<br />Only automated testing matters<br />If it isn’t tested, it isn’t finished or correct<br />Write testable code<br />Embrace abstractions<br />Testing is cross functional, we all own quality<br />
  • 25. Benefits of TDD<br />It allows quick iterations<br />It empowers engineers to change anything, and as such helps in scaling the team<br />It is more cost effective than debugging<br />It obsoletes the need for functional QA<br />It facilitates continuous refactoring, allowing the code to get better with age<br />It attracts the right kind of engineers<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 26. Types of Testing<br />Unit Testing - does the code work?<br />Integration Testing - does the code work together?<br />Regression Testing - learn from your mistakes<br />Frontend Testing - a whole different ballgame<br />
  • 27. Defensive Testing<br />Capture invariants in tests<br />Nightmare scenarios<br />A common conversation at lunch:<br />Alice: What would happen if X blew up?<br />Bob: uh... the site would go down.<br />Fix it, test for it<br />
  • 28. Implementation<br />Frameworks: junit, dbunit<br />CI: Hudson<br />Frontend: Selenium<br />
  • 29. Life of a Deployment<br />Pascal-Louis Perez, kaChing Group Inc.<br />DM<br />PM<br />PM<br />PM<br />ZK<br />
  • 30. Life of a Deployment<br />Pascal-Louis Perez, kaChing Group Inc.<br />DM<br />PM<br />PM<br />PM<br />ZK<br />
  • 31. Life of a Deployment<br />Pascal-Louis Perez, kaChing Group Inc.<br />DM<br />PM<br />PM<br />ZK<br />
  • 32. Life of a Deployment<br />Pascal-Louis Perez, kaChing Group Inc.<br />DM<br />PM<br />PM<br />PM<br />ZK<br />
  • 33. Life of a Deployment<br />Pascal-Louis Perez, kaChing Group Inc.<br />DM<br />PM<br />PM<br />PM<br />ZK<br />
  • 34. Deployment<br />Exponentially increasing group sizes<br />Increased monitoring during deployment<br />Self Test<br />Automated rollbacks<br />
  • 35. Stability<br />Cluster everything<br />As little global state as possible<br />Maintain global state through ZooKeeper<br />Monitor everything<br />
  • 36. ZooKeeper<br />Reliable Distributed Synchronization<br />Service Discovery<br />Service Status<br />Coarse locking<br />
  • 37. Implementation<br />Building: ant<br />Deploying: rpm, yum<br />Monitoring: nagios, jcollectd, RRDtool, jmx<br />Custom automation<br />
  • 38.
  • 39. Monitoring Philosophy<br />Prefer business metrics<br />Monitor statistical deviations not absolute values<br />Automatically annotate graphs<br />
  • 40. Monitoring Errors<br />False negatives - errors of omission<br />False positives - errors of implementation<br />
  • 41. End to End Monitoring<br />Run Selenium on production<br />Accessibility, Speed<br />Ad-hoc Keynote - customized for our flows<br />Must control data creation, analytics impact<br />
  • 42. #future-developments<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 43. Quarantining<br />Isolate new releases<br />Flexible partitioning of requests<br />Gradually shift load to fresh services<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 44. Describing Infrastructure<br />Many moving parts<br />nagios, collectd, backups, services, databases, …<br />Consistency is key<br />Adding new tools should be easy and thorough<br />Standardize best practices<br />Pascal-Louis Perez, kaChing Group Inc.<br />
  • 45. TGIF?<br />Pascal-Louis Perez, kaChing Group Inc.<br />We will be hosting a TGIF in August in our office@pascallouis / @kachingeng<br />
  • 46. References<br />We’re Recruiting jobs@kaching.com<br />kaChing’s blog http://eng.kaching.com<br />kawalahttp://bit.ly/kawala<br />Deployment Infrastructure http://eng.kaching.com/2010/05/deployment-infrastructure-for.html<br />Extreme Testing http://bit.ly/9bOFaA<br />Writing Testable Codehttp://googletesting.blogspot.com/2008/08/by-miko-hevery-so-you-decided-to.html<br />The Testability Explorer Bloghttp://misko.hevery.com<br />ZooKeeperhttp://bit.ly/kc-zookeeper<br />Lessons Learned http://startuplessonslearned.com<br />Pascal-Louis Perez, kaChing Group Inc.<br />

×