Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

@odolbeau Web Architect Olivier Dolbeau

Slide 3

Slide 3 text

@Genes0r Web Developer Benjamin De Bernardi

Slide 4

Slide 4 text

Leader ride-sharing service. Our goal is to become the 1st travel platform. 30€ 30€ 30€ 30€

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Unfortunately, this isn’t our ugliest slide! Sorry.

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Attract new people

Slide 13

Slide 13 text

Let the journey begins!

Slide 14

Slide 14 text

Started August 18th, 2011

Slide 15

Slide 15 text

From 3 to 75 contributors

Slide 16

Slide 16 text

Symfony Upgrades Started with SF2 2.0 Upgrade as soon as we can Remove deprecated code Follow best practices 2.0 → 2.7

Slide 17

Slide 17 text

Failure is not the end, it’s the beginning.

Slide 18

Slide 18 text

DO! DON’T!

Slide 19

Slide 19 text

Should we wear bermudas?

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

DO! Bermudas will rule the world!

Slide 22

Slide 22 text

DO! DON’T!

Slide 23

Slide 23 text

Pimp your kernel.

Slide 24

Slide 24 text

Use case Deal with white labeled products (and “medias”).

Slide 25

Slide 25 text

Expected Deal with ∞ combination of brands / medias. Different configuration / views / ... Keep (a lot of) small containers.

Slide 26

Slide 26 text

Before After Branding Media Environment Debug?

Slide 27

Slide 27 text

Pimp your kernel?

Slide 28

Slide 28 text

DON’T!

Slide 29

Slide 29 text

● 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!

Slide 30

Slide 30 text

DO! DON’T!

Slide 31

Slide 31 text

It’s not a troll.

Slide 32

Slide 32 text

Code fast!

Slide 33

Slide 33 text

Code well?

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

Queries from the view! Hard to control cache strategy No integrity check.

Slide 36

Slide 36 text

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.

Slide 37

Slide 37 text

DO? DON’T? Not an easy choice.

Slide 38

Slide 38 text

DO! DON’T!

Slide 39

Slide 39 text

Event Dispatcher a little? a lot? everywhere?

Slide 40

Slide 40 text

~100 listeners

Slide 41

Slide 41 text

Check eventName & event interface Dispatch the event in the application. Decorated EventDispatcher. Publish to RabbitMQ

Slide 42

Slide 42 text

129 workers. mail sms publication push indexation image resizing alerts profile completion We love workers!

Slide 43

Slide 43 text

+ 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?

Slide 44

Slide 44 text

DO! But do it carefully!

Slide 45

Slide 45 text

DO! DON’T!

Slide 46

Slide 46 text

Put everything in the same place?

Slide 47

Slide 47 text

It’s called V3

Slide 48

Slide 48 text

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)

Slide 49

Slide 49 text

406 187 NLOC There are “only” 268 041 NLOC for symfony/symfony

Slide 50

Slide 50 text

Size doesn’t matter!

Slide 51

Slide 51 text

IT’S TOO BIG IT’S TOO BIG IT’S TOO BIG

Slide 52

Slide 52 text

~ 30 minutes to run all the unit/functional tests

Slide 53

Slide 53 text

~ 30 minutes to deploy the application

Slide 54

Slide 54 text

What else ? ● Long learning curve ● Too many side effects ● Time consuming ● Big maintenance ● Spaghetti code

Slide 55

Slide 55 text

DO! Then DON’T! You’ll know when you’ll need it. :)

Slide 56

Slide 56 text

DO! DON’T!

Slide 57

Slide 57 text

Put business logic inside Symfony?

Slide 58

Slide 58 text

This is our application. I want to move this logic.

Slide 59

Slide 59 text

Users, ratings, notifications, ridemap... MICRO-SERVICES

Slide 60

Slide 60 text

MICRO-SERVICES

Slide 61

Slide 61 text

MICRO-SERVICES

Slide 62

Slide 62 text

The gateway

Slide 63

Slide 63 text

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

Slide 64

Slide 64 text

How to: Get a rating

Slide 65

Slide 65 text

Business

Slide 66

Slide 66 text

A Web Service Like Conversation Request message Response message Client Server

Slide 67

Slide 67 text

Data

Slide 68

Slide 68 text

Data ● Cache ready ● Backend agnostic

Slide 69

Slide 69 text

Data ● Cache ready ● Backend agnostic Encapsulation !

Slide 70

Slide 70 text

Data RedisStorage is able to contain a DBALStorage Encapsulation !

Slide 71

Slide 71 text

Data RedisStorage DBALRatingStorage Fallback on DBALRatingStorage

Slide 72

Slide 72 text

The gateway ❖ Flexible ❖ Easy to test ❖ Deployed when needed ❖ Used for all new projects

Slide 73

Slide 73 text

V3 Previous ecosystem

Slide 74

Slide 74 text

Gateway V3 W W W W W C W C C C W Current ecosystem W ● 90 workers ● 40 commands

Slide 75

Slide 75 text

V3 W W W W W C W C C C W Future ecosystem? W Gateway Gateway Gateway

Slide 76

Slide 76 text

V3 W W W W W C W C C C W Future ecosystem? W B B B B B B D D D

Slide 77

Slide 77 text

Put business logic inside Symfony?

Slide 78

Slide 78 text

DON’T!

Slide 79

Slide 79 text

I’ve found a use case!

Slide 80

Slide 80 text

NO YOU DON’T!

Slide 81

Slide 81 text

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.

Slide 82

Slide 82 text

Symfony2 was a good choice. Even if we made lot of wrong choices. We’ll decouple!

Slide 83

Slide 83 text

Keep growing! Simpler with several small applications?

Slide 84

Slide 84 text

● 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