Fast but Not Loose: Typesafe Clients in a Distributed Service Architecture, a retrospective #gotocon #gotoaar #gilttech Eric Bowman @ebowman VP Architecture @ Gilt Groupe ebowman@gilt.com Monday, September 30, 13
Monday, September 30, 13
Monday, September 30, 13
• Scala • Aster Data • Play • Mahout • PostgreSQL • Jersey • MongoDB • SBT • Voldemort • Docker • Kafka • Continuous Delivery Microservices Monday, September 30, 13
http://upload.wikimedia.org/wikipedia/commons/1/16/Ruby_on_Rails-logo.png http://wiki.postgresql.org/wiki/File:PostgreSQL_logo.3colors.svg Monday, September 30, 13
http://logonoid.com/images/thumbs/christian-louboutin-logo.jpg Monday, September 30, 13
http://data.iluxdb.com/data/christian-louboutin-daffodile-160mm-python-masai-1130127cm09_001.jpg?dd80c0 Monday, September 30, 13
http://upload.wikimedia.org/wikipedia/commons/7/79/Operation_Upshot-Knothole_-_Badger_001.jpg Monday, September 30, 13
Monday, September 30, 13
Monday, September 30, 13
Monday, September 30, 13
Monday, September 30, 13
Monday, September 30, 13
Monday, September 30, 13
Monday, September 30, 13
http://blog.verwilst.be/wp-content/uploads/2008/12/java.gif Monday, September 30, 13
swift user_service order_service payment_service product_service cart_service pagegen Monday, September 30, 13
http://megmurph.com/wp-content/uploads/2013/03/success-1.jpg Monday, September 30, 13
Service X Front End Service Y Service Z Monday, September 30, 13
Service X Front End Service Y Service Z Monday, September 30, 13
Content from Service X Service X Content from Z Front End Service Y Content from Service Y Service Z Monday, September 30, 13
Front-End Tier Service Tier Data Tier Monday, September 30, 13
Caching Front-End Tier Light Computation Orchestration Service Tier Data Tier Monday, September 30, 13
Caching Front-End Tier Light Computation Orchestration Caching Service Tier Heavier Computation Separation of Concerns Data Tier Monday, September 30, 13
Caching Front-End Tier Light Computation Orchestration Caching Service Tier Heavier Computation Separation of Concerns Data Tier Data Access (Disk/SSD/RAM) Monday, September 30, 13
Caching Front-End Tier Light Computation Orchestration Caching Service Tier Heavier Computation Separation of Concerns Data Tier Data Access (Disk/SSD/RAM) • Runtime Temperature • Development Temperature Monday, September 30, 13
Service Front End Javascript Data Source Application JDBC ➾ HashMap ➾ JSON ➾ HashMap ➾ JSON JSON http://gilt.com Monday, September 30, 13
Service Front End Javascript Data Source Application JDBC ➾ HashMap ➾ JSON ➾ HashMap ➾ JSON JSON http://gilt.com Chaos Grows Quickly Monday, September 30, 13
Front End Service JSON ➾ HashMap ➾ JSON Data JDBC ➾ HashMap ➾ JSON Source Service Javascript Application JSON ➾ HashMap ➾ Data JSON JDBC ➾ HashMap ➾ JSON Source http://gilt.com Service JSON ➾ HashMap ➾ JSON Data JDBC ➾ HashMap ➾ JSON Source Monday, September 30, 13
Front End Service JSON ➾ HashMap ➾ Service JSON Data JDBC ➾ HashMap ➾ JSON Source JSON ➾ HashMap ➾ JSON Javascript Service Application JSON ➾ HashMap ➾ JSON ➾ HashMap ➾ JSON JSON Data JDBC ➾ HashMap ➾ JSON Source http://gilt.com Service JSON ➾ HashMap ➾ JSON Data JDBC ➾ HashMap ➾ JSON Source Monday, September 30, 13
http://www.recruitmenttakeout.com/wp-content/uploads/2013/04/brian.png Monday, September 30, 13
• Fast • Service Decomposition • Implicit core model was good Monday, September 30, 13
• Org Scaling • APIs • Implicit core model was ... implicit Monday, September 30, 13
A data model and APIs for services Monday, September 30, 13
A data model and APIs for services (aka, RPC) Monday, September 30, 13
core service core service core service core service Legacy http://git-scm.com/images/logos/downloads/Git-Logo-2Color.png Monday, September 30, 13
core service commons.jar core core clients service core data core model service async client framework core service Greenfield Legacy http://git-scm.com/images/logos/downloads/Git-Logo-2Color.png Monday, September 30, 13
core service commons.jar • Users core • Sales core clients service • Products core data • Skus core model service • Assets async client • Targeting framework core • Auth service Greenfield Legacy http://git-scm.com/images/logos/downloads/Git-Logo-2Color.png Monday, September 30, 13
service client core Monday, September 30, 13
• RESTful service • Scala clients • All APIs futures-based client • Case class schema core Monday, September 30, 13
service core Compile/Runtime Dependency client client service core Monday, September 30, 13
Consumer Service Client Core Core “Embassy Soil” Monday, September 30, 13
Consumer Service Client Core Core • Easy functional testing • Service response capture • Test linking • Upgradable • Emergent Regression • Automated upgrades • Compile farmers Monday, September 30, 13
Consumer Service Client Core Core Monday, September 30, 13
Consumer Service Client Core Core • Environment ⊕ Config • Live updates • Indirection • Circuit Breaker Monday, September 30, 13
Monday, September 30, 13
“All of this is completely wrong.”* *Not an actual quote Monday, September 30, 13
1.The network is reliable 2.Latency is zero 3.Bandwidth is infinite 4.The network is secure 5.Topology doesn't change 6.There is one administrator 7.Transport cost is zero 8.The network is homogeneous https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
1.The network is reliable https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
d e v l o 1.The network is reliable s e R https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
2.Latency is zero https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
d e v l o 2.Latency is zero s e R https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
3.Bandwidth is infinite https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
d e v l o 3.Bandwidth is infinite s e R https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
4.The network is secure https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
d e v l o 4.The network is secure s e R https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
5.Topology doesn't change https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
d e v l o 5.Topology doesn't change s e R https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
6.There is one administrator https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
d e v l o 6.There is one administrator s e R https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
7.Transport cost is zero https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
d e v l o 7.Transport cost is zero s e R https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
8.The network is homogeneous https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
d e v l o 8.The network is homogeneous s e R https://blogs.oracle.com/jag/resource/Fallacies.html Monday, September 30, 13
“Still Wrong.”* *Possibly an actual quote Monday, September 30, 13
Convenience Over Correctness http://steve.vinoski.net/blog/2008/07/01/convenience-over-correctness/ Monday, September 30, 13
Public Data Model Client Layer Client Data Model Client Backend Client/Server Serialization Model Service Frontend Service Model Service Backend Database Model Database Monday, September 30, 13
Public Data Model Client Layer • So many models Client Data Model Client Backend • Corners are cut Client/Server Serialization • Typesafe helps Model Service Frontend • Conflation? Service Model • Just the data Service Backend Database Model Database Monday, September 30, 13
Public Data Model Client Layer • So many models Client Data Model Client Backend • Corners are cut Client/Server Serialization • Typesafe helps Model Service Frontend • Conflation? Service Model • Just the data Service Backend Database Model Database “Works in Practice for some use cases” Monday, September 30, 13
Recommend
More recommend