Symfony2 killed me!

418997665c4a3368515ecf9c3d746b95?s=47 Olivier Dolbeau
September 28, 2015

Symfony2 killed me!

From monolithic to microservices at Blablacar.
Talk given at sfPot Nantes #1

418997665c4a3368515ecf9c3d746b95?s=128

Olivier Dolbeau

September 28, 2015
Tweet

Transcript

  1. Symfony2 killed me! Olivier Dolbeau sfPot Nantes #1

  2. @odolbeau Web Architect Olivier Dolbeau

  3. None
  4. None
  5. None
  6. From monolithic to microservices.

  7. Front Admin API Workers Monolithic application

  8. “It does everything, even coffee” Every developer ever

  9. So big!

  10. 406 187 NLOC There are “only” 268 041 NLOC for

    symfony/symfony
  11. 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)
  12. ~ 75 contributors There are 1 193 contributors for symfony/symfony

  13. 3 536 tests There are 17 593 tests for symfony/symfony

  14. 20 minutes to run them all 28 minutes for symfony/symfony…

    #fake
  15. None
  16. None
  17. Cons • Conflicts • Time consuming • Maintenance • Learning

    curve • Side effects
  18. “With minor change comes major bugs” Myself based on its

    personal experience.
  19. Objectifs Our technical objectives at Blablacar

  20. Exponential growth 20 million members in April 2015

  21. countries NEW IN 2015 India Mexico Hungary Romania Serbia Croatia

    19
  22. BlaBlaCar is deploying multiple datacenters.

  23. We need to localize our data.

  24. MICRO-SERVICES

  25. Micro-services Users, ratings, notifications, moderation...

  26. Overview

  27. Overview

  28. NO API!

  29. Enter the gateway...

  30. • It’s code. • It use DDD. • Everyone love

    it! • It’s very well organized. • There’s a lot of (very) strict rules. • It separate business logic & data access. • It’s a vendor! It’s easy to use everywhere!
  31. Global organisation

  32. How to: Get a rating

  33. Business

  34. None
  35. Request

  36. Usage

  37. Usage

  38. Usage

  39. Usage

  40. Usage

  41. Response

  42. Handler

  43. Global organisation

  44. Data

  45. • Cache ready • backend agnostic

  46. • Cache ready • backend agnostic Encapsulation FTW!

  47. D BALStorage

  48. RedisStorage

  49. Gateway • Flexible • Usable everywhere • Very strict •

    Easy to test • Deployed when needed • Used for all new projects
  50. V3 Previous ecosystem

  51. Gateway V3 W W W W W C W C

    C C W Current ecosystem W • 90 workers • 40 commands
  52. V3 W W W W W C W C C

    C W Future ecosystem? W Gateway Gateway Gateway
  53. V3 W W W W W C W C C

    C W Future ecosystem? W B B B B B B D D D
  54. None
  55. None