Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Still on Symfony - What have we learned

Still on Symfony - What have we learned

Last year I talked about how we moved a large ecommerce site from Zend to Symfony 2. We now also run NordstromRack.com on this platform. This year I am going to follow up by touching on a wide variety of subjects related to enterprise applications: Yes, we are still using Symfony. Yes, we still love it. Since we have moved almost all of the code into Symfony, our concerns have shifted: We are now a lot more focused on monitoring and logging (Sentry, StatsD). What's on our dashboard, and what have we learned about performance. I want to touch on how we are moving this large monolithic application towards a Service Oriented Architecture and what we are experimenting with to support such an architecture: Containers (Docker), Service Discovery (Consul), Orchestration etc. How do we ensure our application is as testable as possible (PHPUnit, Behat, our complex build pipeline in Travis CI). Why we are using multiple Kernels and how do we handle configuration with so many bundles.

0e27279de0458f6f0b5d55459042371f?s=128

Baldur Rensch

October 09, 2014
Tweet

More Decks by Baldur Rensch

Other Decks in Technology

Transcript

  1. Still On Symfony What have we learned 1 Baldur Rensch

  2. Who is this guy? architecting at Nordstromrack.com | HauteLook contributing

    on GitHub: @baldurrensch opining on twitter: @brensch 2
  3. What is this all about? Our tech stack Monitoring and

    Logging Testing Multiple Kernels What are we thinking about Current Challenges
  4. Last year we had one web property: this year we

    have a second property running on the same platform: [1,2,3] 4
  5. Last year we had one web property: Off-price, Limited Time

    Sale Events 5 this year we have a second property running on the same platform:
  6. Last year we had one web property: Off-price, persistent catalog

    6 this year we have a second property running on the same platform:
  7. Our Technologies in the browser 7

  8. Our Technologies Caching 8 in the browser

  9. Our Technologies Caching Application layer 9 in the browser

  10. Our Technologies Caching Application layer Data Store 10 in the

    browser
  11. and of course Caching Application layer Data Store 11 in

    the browser
  12. Yes, we are still using Symfony. Yes, we still love

    it. [4] 12
  13. What have we added since? 13

  14. Search 14

  15. Text 15

  16. Text Search here

  17. Text or by category

  18. Text faceting

  19. We are pushing at least 10M updates per day 19

    We do near-real-time inventory updates
  20. Monitoring & Logging 20 [19]

  21. Sentry [5,6] 21

  22. StatsD & Grafana 22 Response codes Query times Response types

    [14, 15, 16]
  23. New Relic 23

  24. What’s on our Dashboard? 24 [13]

  25. Testing 25 [8]

  26. How we test PHPUnit Behat Solr Javascript PhantomJS 26

  27. AliceBundle 27 [11,12]

  28. TravisCI This is what our build pipeline looks like 28

  29. TravisCI Install Solr, PHP, extensions and nginx with PHP- FPM

    29
  30. TravisCI Install Database schemata, and fixture data 30

  31. TravisCI Start PhantomJS 31

  32. TravisCI All kinds of linters and fixers 32

  33. Multiple Kernels - Why? 33 [10] HauteLook Nordstrom Rack Admin

  34. Layout src/ hautelook/ common/ rack/ features/ there is also vendors/

    34
  35. Layout src/ hautelook/ common/ rack/ features/ AppKernel Resources/ config/ console

    HauteLook 35
  36. Layout src/ common/ rack/ features/ CommonApp Kernel config/ Shared configuration

    and AppKernel 36 hautelook/
  37. Layout src/ common/ rack/ features/ Functional tests hautelook/ rack/ admin/

    37 hautelook/
  38. Layout src/ common/ rack/ features/ AppKernel Resources/ config/ console Nordstrom

    Rack 38 hautelook/
  39. Layout src/ common/ rack/ features/ All the bundles 39 hautelook/

  40. Configuration 40 hautelook/ config/ all/ prod/ dev/ test/ rack/ common/

    overwrite Always one file per bundle, named after the config!
  41. Warning! Buzzword Bingo 41 What’s next?

  42. Service Oriented Architecture 42 [17]

  43. Containers (Docker) Docker is awesome for SOA Tooling very premature

    Some problems on Mac with shared directories 43
  44. Service Discovery (Consul) A lot of potential in the process

    of writing a library 44 [9]
  45. Orchestration [7] 45

  46. Current Challenges 46 [18]

  47. When developing with PHP at scale, it seems often there

    are no best practices 47
  48. When developing with PHP at scale, it seems often there

    are no best practices 48 Example:
  49. When developing with PHP at scale, it seems often there

    are no best practices 49 Example: Example: Dealing with Master/Slave connections in Doctrine. Schema builder does not like it.
  50. When developing with PHP at scale, it seems often there

    are no best practices 50 Example: Example: Dealing with Master/Slave connections in Doctrine. Schema builder does not like it. Example: It’s slow and hard to work with SASS using Assetic
  51. Questions? Please give me feedback at: https://joind.in/12192 Oh, and we

    are hiring. Come talk to me if you are interested in working with us! 51
  52. Sources [1] https://play.google.com/store/apps/details?id=com.hautelook.mcom&hl=en [2] https://itunes.apple.com/us/app/hautelook/id390783984?mt=8 [3] https://itunes.apple.com/us/app/nordstrom-rack/id853330019?ls=1&mt=8 [4] http://s352.photobucket.com/user/Cutiexlex728/media/PS-I-still-love-you-by-orangefruits.jpg.html [5]

    https://getsentry.com/signup/r_D3kw/ [6] https://github.com/hautelook/SentryBundle [7] http://lookatmyhappyrainbow.blogspot.com/2011/01/conductor.html [8] https://secure.flickr.com/photos/st3f4n/3845558588/ [9] https://github.com/baldurrensch/consul-php [10] https://en.wikipedia.org/wiki/Corn_kernel [11] https://github.com/nelmio/alice [12] https://github.com/hautelook/AliceBundle [13] http://dashing.io/ [14] https://github.com/etsy/statsd/ [15] https://www.hostedgraphite.com/ [16] http://grafana.org/ [17] https://en.wikipedia.org/wiki/Lego [18] http://pixabay.com/en/people-cover-cry-desperate-314481/ [19] https://commons.wikimedia.org/wiki/ File:Monitoring_a_simulated_test_at_Central_Control_Facility_at_Eglin_Air_Force_Base_(080416-F-5297K-101).jpg 52