75
Marco Cecconi @sklivvz http://sklivvz.com

Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Embed Size (px)

Citation preview

Page 1: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Marco Cecconi @sklivvz

http://sklivvz.com

Page 2: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

ARCHITETTURA?

CHE E’?

Page 3: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Oratorio

Page 4: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 5: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Quasi 150 siti

~40º network più visitato al mondo

Page 6: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 7: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 8: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

650!

Page 9: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 10: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 11: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Altro “server pr0n” qui

http://imgur.com/a/X1HoY

Page 12: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 13: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 14: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 15: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 16: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 17: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 18: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 19: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 20: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 21: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 22: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 23: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

http://stackexchange.com/performance

Page 24: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Agile  

Page 25: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

BAT!CAVERNA

Ciclo scrivi-compila-testa sul computer di casa

Richieste feature

Page 26: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

DEV.SO

Test su server di produzione

git push

BAT!CAVERNA

Page 27: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

BAT!CAVE DEV.SO

META.SE

Utenti testano su meta.stackexchange.com

(“baking”)

git push

BAT!CAVERNA

1-click deploy

Page 28: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

DEV.SO

META.SE

AZZ!

git revert

git push

BAT!CAVERNA

1-click deploy

Page 29: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

DEV.SO

NETWORK META.SE

1-click deploy

git push

1-click deploy

In produzione! Tonnellate di utenti lo usano…

BAT!CAVERNA

Page 30: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

BAT!CAVE DEV.SO

NETWORK META.SE

1-click deploy

git push

1-click deploy

…e richiedono nuove feature!

BAT!CAVERNA

Page 31: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Vai  veloce  e  scassa  le  cose*  

* Non la home page o pagine domande :-)

Page 32: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Vai  veloce  e  scassa  le  cose*  

* Non la home page o pagine domande :-)

Page 33: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Abuso  dell’uso  della  cache  

Page 34: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 35: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 36: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 37: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Il  nostro  amico/nemico:  Il  Garbage  Collector  

Page 38: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 39: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 40: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 41: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 42: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 43: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 44: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Abusiamo della cache per aiutare il GC

Page 45: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 46: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 47: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Abusiamo del compilatore per aiutare il GC

Page 48: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 49: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 50: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 51: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 52: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

IRepository<Order>  orderRepository  =            container.Resolve<IRepository<Order>>();    Order  order  =  orderRepository.Get(35);

La buona, vecchia dependency injection

Page 53: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 54: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

IRepository<Order>  repository  =      new  ValidatingOrderRepository  (          new  SecurityRepository<Order>  (              new  LoggingRepository<Order>  (                  new  CachingRepository<Order>  (                      new  NHibernateRepository<Order>  ()                  )              )          )      );        Order  order  =  repository.Get(35);

Page 55: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Il  nostro  sorgente  

Page 56: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 57: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 58: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 59: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 60: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 61: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 62: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

YAGNI*  

* You Ain’t Gonna Need It!

Page 63: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Librerie  e  open  source  

Page 64: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 65: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 66: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 67: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Create  librerie  di  codice  Rilasciatele  in  Open  Source  

Page 68: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 69: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 70: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

PROGRAMMAZIONE DA “SUPEREROI”

Page 71: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 72: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

LIVELLO STRUMENTI: HATTORI HANZŌ

Page 73: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

•     La  performance  è  una  feature  •     Always.  Be.  Shipping.  •     Usate  le  vostre  circostanze.  •     Rilasciate  O/S  le  vostre  librerie  •     3  monitor  grandi  da  far  schifo*.  

*  I  miei  3  monitor  da  30”  non  fanno  schifo    

MORALE DELLA FAVOLA

Page 74: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015
Page 75: Stack Overflow - It's All About Performance - Marco Cecconi - Codemotion Roma 2015

Marco Cecconi @sklivvz

http://sklivvz.com

Stiamo assumendo 10 nuovi sviluppatori da ovunque nel mondo!