R2D2 to BB8 (english version)
-
Upload
vincent-chalamon -
Category
Technology
-
view
446 -
download
1
Transcript of R2D2 to BB8 (english version)
TheFork B2B data migration with Symfony3
R2D2 to BB8
“When something evolves, everything around evolves the same”
Paulo Coelho
Vincent Chalamon
Lead Developer atLes-Tilleuls.coop
@vincentchalamon
github.com/vincentchalamon
Guillaume Voisin
Lead Developer atTheFork
@guillaumvoisin
github.com/guillaumevoisin
450kreservations per month
12++ countries
32krestaurants
70++developers
Many usages
Users++
Internationalization
R2D2Current V2
The ForkManager V2
R2D2 > Current V2
Content
Reservation
Seating planMarketing& CRM
Stats
8
● Application dedicated to restaurants
● Service management for restaurant
● Communication tool
The Fork Manager V2
R2D2 > Current V2
Important technical debt
Hard to update
Many projects dependencies
Outdated/Non user-friendly features
9
The Fork Manager V2
R2D2 > Current V2 10
BB8V3
The ForkManager V3
BB8 > V3
Content
Seating planMarketing& CRM
Stats
Reservation
Starting on good practices
BB8 > V3
Semantics
MVP approachSustainable thinking: refactos
Try POC
Failingis cool!
Quality: UT, FT
13
BB8 > V3
TwGit
14
API
SPA
And for front-end guys…
BB8 > V3
V2
APP
Loaders
Transformers
Double writing
15
V3
LegacyBundle
BB8 > V3
Isolate developments
16
Disable LegacyBundle
V2 entity mapping
BB8 > V3 17
Imported data
Restaurant
ReservationsDescription
Opening times
Closing times
Customers
Loaders
● Symfony command● 1 loader per entity● Each loader has its
own priority
Loaders
Loaders
Registry Loader
19
V2
Loaders
INSERT INTO v3.restaurant…SELECT v2.restaurant…
Loaders
20
V3
Loaders
Loaders
Think disposable
MVP: import relevant data only
Doctrine can be useless
Refacto, did you say refacto?
Duplication / errors management
21
Complicated sometimes Loader can be
Execute loaders in production
Loaders
● Load all data = 9 days
Progressive migration
24
Outage
V2
Loaders
Company 3 Company 1Company 2
25
V3
Progressive migration
Transformers
Transformers
V2
V3
27
Transformers
Double writing
Double writing 31
V2
APP
TransformersV3
Double writing
POST http://api.tfm3-lafourchette.com/restaurants PUT http://api.tfm3-lafourchette.com/restaurants/legacy/3
Review
Review
Review
> 300unit tests
> 80%code coverage
1 year of development
33
LegacyBundle:75% of dev.
> 10 contributors
> 150functional tests
Jedi advices
Review 34
“A thorough study of legacy you will do”
“With real data you’ll test”
“Careful you’ll be”
@TheFork_tech
https://joind.in/talk/e08a1
Michiel VanWerkhovenProduct Owner
Olivier VersanneScrummaster
Mickael LabrutBackend lead developer
Guillaume VoisinBackend lead developer
@guillaumvoisin
Vincent ChalamonBackend lead developer
@vincentchalamon
Gregory CopinTechnical director @gregcop1
Dimitri HautotFrontend developer@Dhautot
Matteo ReinerioFrontend developer@zippymat
Alexis TondelierFrontend lead developer @AlexisTondelier
Cédric DéservilleBackend lead developer @talumn
#MayTheForkBeWithYou
@coopTilleuls