Transcription
Building the StonehengeUsing Gall’s lawby Fabricio Buzeto
In love with code since 2002Entrepreneur since 2005Fabricio BuzetoResearcher since 2008a.k.a FabsStartuping since 2011CTO @ bxblue
Gall’s Law
“Gall’s LawA complex systemthat works isinvariably found tohave evolved from asimple system thatworked.“John Gall - 1975“Systemantics: How Systems Really Work and How They Fail.”
How complex systems evolve?
How complex systems evolve?
“Gall’s LawA complex systemthat works isinvariably found tohave evolved from asimple system thatworked.“John Gall - 1975“Systemantics: How Systems Really Work and How They Fail.”
1. Any living cellwith 2 or 3neighbors survivesGame of Life2. Any dead cellwith 3 livingneighbors comes tolife3.Any remainingliving cell diesJohn Conway - 1970
Simple rules can lead to complex behaviors
“Gall’s LawContinuingA simple system mayor may not work.“John Gall - 1975“Systemantics: How Systems Really Work and How They Fail.”
What “works” means?
What’s“working”What a working software does?A software thatworks, is asoftware thatfulfil its purpose
For what purpose?What’s PurposeFor what?- Business - Politics- Learning
Whos is theClient?Who we need this?Who needs it?-TheTheTheTheUser SponsorCompanyTeam
“Gall’s LawContinuingJohn Gall - 1975“Systemantics: How Systems Really Work and How They Fail.”A complex systemdesigned fromscratch never worksand cannot bepatched up to makeit work. You haveto start over witha working simplesystem.“
Starting simple
Qualcanal the first yearsTwitterDjangoMySQLAVG 1k Twets/dayPeak 1k Tweets/hour
Qualcanal the first yearsDataSiftDjangoMySQLAVG 10k Twets/dayPeak 5k Tweets/hour
Qualcanal the first yearsDataSiftDjangoDjangoDjangoDjangoMySQLAVG 50k Twets/dayPeak 5k Tweets/minute
Qualcanal the first yearsDataSiftDjangoDjangoDjangoMySQLMySQLMySQLAVG 100k Twets/dayPeak 15k Tweets/minute
Qualcanal the later yearsCassandraApache StormDataSiftDjangoDjangoMySQLMySQL
Qualcanal the later yearsDataSiftApacheStormCassandraDjangoAVG 1M Twets/dayPeak 50k Tweets/minute
bxblue the first yearsUnbounceGoogle Docs
bxblue the first yearsUnbounceGoogle DocsRails
bxblue the first yearsUnbounceGoogleSpreadsheetsRailsPipedrive
bxblue the first yearsMongoDBRailsPipedrive
bxblue the first yearsUnbounceWill users want migrate their loans?GoogleDocsUnbounceGoogle DocsHow do loans are sold?RailsGoogleSpreadsheetsHow can I do it faster?UnbounceRailsPipedriveMongoDBHow can I do it properly?RailsPipedrive
The monolithWhy?The Utah monolith - November 2020
Simple to DevelopThe monolithSimple like thatSimple to TestSimple to DeploySimple to ReuseSimple to Scale*Chris thic.html
Hard to Scale:The monolithDrawbacksChris thic.html-TestsTeamDeployStackChanges
bxblue as scaleMongoDB 15RailsPipedrive
bxblue as scaleMongoDB 15RailsSidekiqPipedrive
Don’t trustyourselfTrust the machineAutomate your tools-TestsCode QualityDeployMonitoring
Automate your tasksTestsCode QualityDeployMonitoringUnit TestsCoverageCI/CDErrorsCommonsLinterSource ControlServersIntegrationCode QualityCloud PipelineLogsSpeedSecurityJourney
Automate your tasks - bxblueTestsCode factorybotrubocopGithubNew se
bxblue as scaleUser JourneyContent marketingRailsLanding PagesETLEvent handlingData Analysis.
Let’s complicate things
DistributedSystemsWhat does it mean for a systemto be distributed?Unmesh Joshi - distributed-systems/They run onmultiple servers.They manage data.
MicroservicesMiniservices as wellChris thic.htmlSimple,self-contained,loosely coupled,single focused,services
The CitadelI love my monolithDHH - olithSupported by, smallsingle focused,problem specific,services
MacroservicesMore than HungryMicroservicesNitesh Gupta - text-focused,multi-purposeservices
bxblue the later yearsMongoDB 15RailsSidekiqPipedrive
bxblue the later years 15RailsSidekiqMongoDBPipedrive
bxblue the later years goDB5
bxblue the later years7anti-fraudSidekiq ekiqMongoDB5
bxblue the later yearsRailsSidekiq 10MongoDBPipedrive
TheStonehenge
StonehengeOne step further ontoMacro vice-enabled,applications
StonehengeOne step further ontoMacro ServicesSelf-sufficientapplicationsMeans they work bythemselves.
StonehengeOne step further ontoMacro ServicesContext-focusedapplicationsMeans they handle asingle context verywell
Service-enabledapplicationsStonehengeOne step further ontoMacro ServicesMeans they areavailable tointegrate and scalewith others
Law ofconservation ofcomplexityComplexity has to gosomewhereLarry Tesler htmlEvery applicationhas an inherentamount ofcomplexity thatcannot be removedor hidden
Dead CodeDon’t let the zombies bite youSimone Romano and Giuseppe Scanniello - 2018http://www.cs.wm.edu/ denys/pubs/TSE'18-DeadCode.pdf30% of files25% of classes5% 10% of methods
Dead Products* for seed round orcrowdfunded companiesdeath rate is 97%CBInsights - ilure-post-mortem/70% of Companieswill fail until 20months after lastfundraising*
Summing up
A simple system mayor may not work.Gall’s LawA complex system that works isinvariably found to have evolvedfrom a simple system thatworked.John Gall - 1975“Systemantics: How Systems Really Work and How They Fail.”A complex systemdesigned fromscratch never worksand cannot bepatched up to makeit work.
Don’t trustyourselfTrust the machineAutomate your tools-TestsCode QualityDeployMonitoring
WhyStonegenge?“The simplest solution is usuallythe best”It’s allDistributed SystemsDecision making ishardThings will changefriar William of Ockham 1287–1347Occam’s razor
ThanksBuilding the StonehengeUsing Gall’s lawby Fabricio Buzetoabout.buzeto.com@nukdfbxblue.com.br
bxblue.com.br/vagasWe’re hiring
Django Django MySQL MySQL AVG 100k Twets/day Peak 15k Tweets/minute. Qualcanal the later years MySQL Django DataSift Django Apache Storm MySQL Cassandra. Qualcanal the later years . New Relic Logentries Knapsack breakman Metabase. bxblue as scale Rails User Journey Content marketing Landing Pages ETL