Date post: | 16-Apr-2017 |
Category: |
Engineering |
Upload: | ontico |
View: | 3,750 times |
Download: | 0 times |
Marco Cecconi@sklivvzhttp://sklivvz.com
ARCHITECTURE?
WHAT THE HECK IS
THAT?
In the past 12 months
• The Stack Exchange network grew from 130 to 150 sites (+15%)
• US site rank for visitors of the whole network improved from #44 to #19 (-25 ranks)
Tight, tight, code cycles
BATCAVE
Code-build-test cycle running on home machine
feature requests
BATCAVE DEV.SO
Test on the real servers
git push
BATCAVE DEV.SO
META.SE
1-click deploy
Users test on meta.stackexchange.com
(“baking”)
git push
BATCAVE DEV.SO
META.SE
1-click deploy
HALP!
git revert
git push
BATCAVE DEV.SO
NETWORK META.SE
1-click deploy
git push
1-clickdeploy
It’s live! Tons of users use it…
BATCAVE DEV.SO
NETWORK META.SE
1-click deploy
git push
1-clickdeploy
…and provide new
feature requests
Move fast and break things*
* Not the home page or question page :-)
Move fast and break things*
* Not the home page or question page :-)
“Normal” caching
Our frienemy:The Garbage Collector
Too many objects instantiated
Caching abuse
Compliler abuse
Framework abuse
Complex instance graph
Avoiding common patterns
IRepository<Order> orderRepository = container.Resolve<IRepository<Order>>();
Order order = orderRepository.Get(35);
Dependency injection pattern
IRepository<Order> repository = new ValidatingOrderRepository ( new SecurityRepository<Order> ( new LoggingRepository<Order> ( new CachingRepository<Order> ( new NHibernateRepository<Order> () ) ) ) ); Order order = repository.Get(35);
A look at our source code
Automated TESTERS
What we do test:Open Source and Libraries
SECRET SAUCE
HIRE HACKERS…
…LET THEM CODE
BOSS MODE CODE
BOSS MODE TOOLS
• Performance is a feature• Always. Be. Shipping.• Use your circumstances.• Open source your libraries• 3 obscenely big monitors.
KEY TAKEAWAYS
Thank you
Marco Cecconi@sklivvz
http://sklivvz.com
perl -wlne'BEGIN{$b=rand$=}$a=qw/To lzhk_kypam_yr_qryaimtcpdjmu_bmr_amk_enq_ghqhmf Cnvm/[($_<=>int$b)
+1];$a=~y/a-zA-Z/b-zaB-ZA/;print $a'