meetic backend mutation with symfony
TRANSCRIPT
![Page 1: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/1.jpg)
Backend MutationWith Symfony
![Page 2: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/2.jpg)
Joris CalabreseHead Of
Industrialization
Etienne BroutinArchitect
![Page 3: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/3.jpg)
Meetic corp
• Started in 2001
• Leader in Europe, 17 countries
• Millions of Monthly Active Users
• 150 people in IT team
![Page 4: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/4.jpg)
Past•
Present•
Future
![Page 5: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/5.jpg)
Start up + Rapid Growth=
Spaghetti
![Page 6: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/6.jpg)
Monolithic code
Webservices
Backoffices
Mobile Web
WAP
Desktop
Cronjobs
…
![Page 7: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/7.jpg)
700k
NLOC
![Page 8: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/8.jpg)
Billing Systems
DataBase centric architecture
MailingBI
Procedures + Triggers
![Page 9: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/9.jpg)
Some Metrics
4 000TABLES
900configurations
400Servers
![Page 10: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/10.jpg)
Need to change something ?
A. Ask 400 peopleB. Read all the code, understand everything then notify everyone
C. Break everythingD. Add a dirty “if” for your specific caseD. Add a dirty “if” for your specific case
![Page 11: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/11.jpg)
Spaghetti + Quality Approach=
J’ai de la chance
![Page 12: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/12.jpg)
What Was Our Development Env?
• Locked Files System• 1 Database for all Developers• No Automated Tests
![Page 13: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/13.jpg)
QA
• 1 release every 2 weeks• 50 projects by release• 1 button !
What Was Our Quality Approach?
![Page 14: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/14.jpg)
Who wants to play?
Illustration: mailchimp • mailchimp.com
![Page 15: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/15.jpg)
When it works…
![Page 16: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/16.jpg)
…and when it fails!
![Page 17: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/17.jpg)
Some Stats
10TEAMS
2Deploy/WEEK
2012 2015
Plateform Growth
1
5
65BUGS/WEEK
1ROLLBACK/W
EEK
Spec v1
![Page 18: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/18.jpg)
Bug Cost
Source: Applied Software Measurement, Capers Jones, 1996
![Page 19: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/19.jpg)
And, If we want to add automated tests?
A. Chuck Norris develops without bug
B. Only test get_next_week()
C. Mock 200 global variables and 35 functions
D. I will do it when I have timeD. I will do it when I have time
![Page 20: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/20.jpg)
New Talent + Innovation Need
=New Architecture
![Page 21: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/21.jpg)
Target
![Page 22: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/22.jpg)
All Clients are born equal in dignity and rights1
![Page 23: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/23.jpg)
SOA architecture
Prevents code duplicationMutualize features Web Services
![Page 24: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/24.jpg)
But this single, centralized webservice will still be huge and complex ?
Too long…
![Page 25: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/25.jpg)
All Web Services have a single responsibility
2
Message Photos Profile Search
![Page 26: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/26.jpg)
Strict REST API
profiles messages
GET /profiles/xxxxPUT /profiles/xxxx
GET /messages/xxxxPOST /messages
![Page 27: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/27.jpg)
profiles messages
Do not share your data
![Page 28: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/28.jpg)
Inside Business services
Symfony serialization for JSON input / output
Business Logic
Cache Layer
Doctrine DBAL
Controller
Service
Proxy Cache
DAO
![Page 29: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/29.jpg)
Online Photos Profile Rights Search Boost
That means clients should make several calls to display a single page?
Too long…
![Page 30: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/30.jpg)
Online Photos Profile Rights Search Boost
But from client point of view
![Page 31: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/31.jpg)
Online Photos Profile Rights Search Boost
But from client point of view
![Page 32: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/32.jpg)
API Exposure Layer
![Page 33: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/33.jpg)
Separation of concerns
business logicdatabase access
orchestrationsecurity, sessionsconfiguration
UX
API Exposure Layer
![Page 34: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/34.jpg)
Exposure layer
API Exposure Layer
Web Business Services
Back Office
Mailing
Payments
![Page 35: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/35.jpg)
Inside Exposure Layer
Use Guzzle with batch calls
FOS\RESTBundle
Orchestrate API callsAssemble results from APIs
Controller
Manager
API Client
![Page 36: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/36.jpg)
Android application
Example to display a list of members
GET /members
Get a list of user ids using Location search
Fetch user data
Exposure Layer
Configuration:
group B
uses location search
AB Tests Search Profile
user is from group B
1 23
![Page 37: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/37.jpg)
Migration Strategy
Webservices
Web Business Services
![Page 38: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/38.jpg)
New Quality Approach
![Page 39: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/39.jpg)
Testing Strategy: Unit test
![Page 40: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/40.jpg)
Threshold Spirit
Controller
Service
DAO
Complexity Code Coverage
Complexity Code Coverage
Complexity Code Coverage
![Page 41: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/41.jpg)
Testing Strategy: Integration test
![Page 42: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/42.jpg)
Continuous Integration
60JOBS
5Agents
5Platform
10 builds in
prOgress
![Page 43: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/43.jpg)
Product Centric
• Kept a good Knowledge
• Share Product Vision
• Share a same vocable
Behavior Driven Development
![Page 44: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/44.jpg)
Testing Strategy: Behavior Test
Android application
GET /members
Exposure Layer
AB Tests Search Profile
1 23
Given I am a user of the B groupAnd my geoloc position is ParisWhen I launch a search on the onlineThen I see a list of profileAnd the first profiles are near of my position
![Page 45: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/45.jpg)
Docker Focus
• Allow the dev to automated testing all technical stack
• 50 instances to launch in parallel
• Different scope and context for the automated tests
![Page 46: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/46.jpg)
Docker Focus: How to?
DockerCompose
Exposure Layer
BusinessService
LegacyService
Oracle
MySQL
1
2
3
4
5
23
45
![Page 47: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/47.jpg)
QA Position
Design Build Test Prod
![Page 48: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/48.jpg)
QA Position
Design Build Test Prod
![Page 49: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/49.jpg)
Team Autopsy
Front Developer• AngularJS, Grunt, …• Code Review• TDD, BDD
Back Developer• Design• Symfony2, Composer, …• Code Review• TDD,BDD
Product Owner• Define feature• Scenario writing• Define Business Indicators
![Page 50: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/50.jpg)
Developer Community
• Continuous Learning
• Ease the sharing
• Improve the Skill Switching
• Community Of Practice
• BBL
![Page 51: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/51.jpg)
Source Management
180Repositories
12groups
14Technos
50+Users
![Page 52: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/52.jpg)
Jenkins/Gitlab Focus
master
Working-branch
Unit tests
Integration tests
Static Analyse
Hey all!Who wants to review my MR?
I would love to. You can assign it to me.
![Page 53: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/53.jpg)
Dev Infrastructure
API
API
![Page 54: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/54.jpg)
Some Stats
2012 2015
1x
7x
Bug In By Week
2012 2015
2
10
Deployment by Day
0,5%Of rollback
3 756Written tests
91,3
%Code
coverage
![Page 55: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/55.jpg)
Our New Future
![Page 56: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/56.jpg)
• Impact management
• Reusability
From Architecture point of view
![Page 57: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/57.jpg)
Continuous Deployment
<< Dev Metrics
Prod Metrics >>
![Page 58: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/58.jpg)
Next Challenges
![Page 59: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/59.jpg)
Harder, Better, Faster, Stronger!
by
![Page 60: Meetic Backend Mutation With Symfony](https://reader031.vdocument.in/reader031/viewer/2022031518/55a685591a28ab48498b4906/html5/thumbnails/60.jpg)