Slide 1

Slide 1 text

The  Architecture  Of   Marco Cecconi @sklivvz http://sklivvz.com

Slide 2

Slide 2 text

Sizing  up  the  problem  

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

*source: Quantcast, Alexa #50-­‐ish  network  for  traffic*   (between imdb.com and t.co)

Slide 7

Slide 7 text

#50-­‐ish  network  for  traffic*   …and  #17  in  Portugal!?     *source: Quantcast, Alexa   much successful very traffic obrigado, yo!

Slide 8

Slide 8 text

543,255,552  pageviews  in  the  last  30  days*   *source: Quantcast

Slide 9

Slide 9 text

Our  datacenter?  

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

web servers load balancers redis search database http(s) http rest http protobuf sql sql protobuf tag engine

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

We  are  sNll  scaling  up!  

Slide 14

Slide 14 text

Our  development  cycle  

Slide 15

Slide 15 text

BAT!CAVE Code-build-test cycle running on home machine feature requests

Slide 16

Slide 16 text

BAT!CAVE DEV.SO Test on the real servers git push

Slide 17

Slide 17 text

BAT!CAVE DEV.SO META.SE 1-click deploy Users test on meta.stackexchange.com (“baking”) git push

Slide 18

Slide 18 text

BAT!CAVE DEV.SO META.SE 1-click deploy HALP! git revert git push

Slide 19

Slide 19 text

BAT!CAVE DEV.SO NETWORK META.SE 1-click deploy git push 1-click deploy It’s live! Tons of users use it…

Slide 20

Slide 20 text

BAT!CAVE DEV.SO NETWORK META.SE 1-click deploy git push 1-click deploy …and provide new feature requests

Slide 21

Slide 21 text

Move  fast  and  break  things*   * Not the home page or question page :-)

Slide 22

Slide 22 text

Move  fast  and  break  things*   * Not the home page or question page :-)

Slide 23

Slide 23 text

Abusing  caching  

Slide 24

Slide 24 text

Network Level Caches (CDN, etc.) Server Level Cache (HttpRuntime.Cache) Site Level Cache (Redis) SQL Server Database Cache (384 gigs of RAM!) Solid State Disk

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

RisoQo  &  SpagheS  

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Throwing away risotto… one grain at a time!

Slide 35

Slide 35 text

Abuse  caching  for  GC   performance  

Slide 36

Slide 36 text

IRepository  orderRepository  =            container.Resolve>();     Order  order  =  orderRepository.Get(35); This is what you think you are doing…

Slide 37

Slide 37 text

…but if you think about it a bit more…

Slide 38

Slide 38 text

...this is what you are actually doing! IRepository  repository  =      new  ValidatingOrderRepository  (          new  SecurityRepository  (              new  LoggingRepository  (                  new  CachingRepository  (                      new  NHibernateRepository  ()                  )              )          )      );         Order  order  =  repository.Get(35);

Slide 39

Slide 39 text

Throwing away spaghetti… one strand at a time!

Slide 40

Slide 40 text

Dependency  InjecNon  is  our   version  of  spagheS  code  

Slide 41

Slide 41 text

Our  source  code  

Slide 42

Slide 42 text

Few projects :-)

Slide 43

Slide 43 text

Few projects :-) Few lines of code :-)

Slide 44

Slide 44 text

Few projects :-) Few lines of code :-) Eeek! very few tests :-S

Slide 45

Slide 45 text

Few projects :-) Few lines of code :-) Awesome community to help :-D Eeek! very few tests :-S

Slide 46

Slide 46 text

YAGNI*   * You Ain’t Gonna Need It!

Slide 47

Slide 47 text

Libraries  and  open  source  

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

Wrap  code  in  libraries     and  open  source  it  

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

“SUPERHERO” CODING

Slide 56

Slide 56 text

HIRE “NINJA” CODERS

Slide 57

Slide 57 text

TOOLS LEVEL: “NINJA”

Slide 58

Slide 58 text

•     Performance  is  a  feature   •     Always.  Be.  Shipping.   •     Use  your  circumstances.   •     Open  source  your  libraries   •     3  obscenely  big  monitors.     KEY TAKEAWAYS

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

Marco Cecconi @sklivvz http://sklivvz.com we are hiring new ninjas from anywhere in the world!