Symfony @ BlaBlaCar

Symfony @ BlaBlaCar

Talk given with @odolbeau at the Symfony Con 2015. We present some of the use-cases we encountered with symfony at BlaBlaCar.

0bd054e9a591ec3afb355f5c2c899a23?s=128

Benjamin De Bernardi

December 04, 2015
Tweet

Transcript

  1. 1.
  2. 4.

    Leader ride-sharing service. Our goal is to become the 1st

    travel platform. 30€ 30€ 30€ 30€
  3. 5.
  4. 7.
  5. 8.
  6. 9.
  7. 10.
  8. 11.
  9. 16.

    Symfony Upgrades Started with SF2 2.0 Upgrade as soon as

    we can Remove deprecated code Follow best practices 2.0 → 2.7
  10. 20.
  11. 25.

    Expected Deal with ∞ combination of brands / medias. Different

    configuration / views / ... Keep (a lot of) small containers.
  12. 28.
  13. 29.

    • Not that small containers • You need to add

    code in app_prod. php to choose the right kernel to boot. • You can’t easily use your application as a consumer. DON’T!
  14. 34.
  15. 36.

    What else? + Quick to bootstrap a new project +

    Quick to code a small project - Hard to respect MVC - Hard to deal with cache - Hard to deal with integrity problems in DB - Not made to decouple code (relations). - Not made to scale.
  16. 41.

    Check eventName & event interface Dispatch the event in the

    application. Decorated EventDispatcher. Publish to RabbitMQ
  17. 43.

    + Perfect to decouple code inside the app. + Small

    listeners, easy to understand, to test. + Easy to dispatch events outside application. + Scalable! - Sometimes, hard to understand what happen. - Need tools / rules to keep a common logic. - Try to limit entities usage. ;) What else?
  18. 48.

    29 582 Commits There are “only” 15 506 commits for

    symfony/symfony There are “only” 10 228 commits for joyent/node There are “only” 9 266 commits for twbs/bootstrap There are 44 809 commits for rails/rails (but it’s ruby… #troll)
  19. 54.

    What else ? • Long learning curve • Too many

    side effects • Time consuming • Big maintenance • Spaghetti code
  20. 63.

    The gateway ❖ It’s code ❖ It uses DDD ❖

    Everyone love it ❖ It’s very well organized ❖ There’s a lot of (very) strict rules ❖ It separates business logic & data access ❖ It’s a vendor ! Easy to use everywhere
  21. 65.
  22. 67.
  23. 72.

    The gateway ❖ Flexible ❖ Easy to test ❖ Deployed

    when needed ❖ Used for all new projects
  24. 74.

    Gateway V3 W W W W W C W C

    C C W Current ecosystem W • 90 workers • 40 commands
  25. 75.

    V3 W W W W W C W C C

    C W Future ecosystem? W Gateway Gateway Gateway
  26. 76.

    V3 W W W W W C W C C

    C W Future ecosystem? W B B B B B B D D D
  27. 78.
  28. 81.

    DO! DON’T! + Use feature flags / on the fly

    toggling. + Make code reviews. + Keep a clean codebase. + Use encapsulation! <3 + Be generic + Promote reusability - Onboard people too quickly. - Depend too much on the framework - Let your container get too big. - Try not to extend the framework.
  29. 82.

    Symfony2 was a good choice. Even if we made lot

    of wrong choices. We’ll decouple!
  30. 84.

    • Fail, learn, succeed! • Microservices FTW! • Be worldwide!

    • Bermudas are great tools to build performant websites Benjamin De Bernardi @Genes0r Olivier Dolbeau @odolbeau We’re hiring! In Paris & Warsaw! http://blbl.cr/dreamjobs