adding flexibility and scalability to bouygues telecom with mongodb @ mongodbworld
DESCRIPTION
At Bouygues Telecom, we rely heavily on our user data to relay the best possible services. We had been using a proprietary solution for our directory of customer services. This system is used by severals other teams, such as voicemail, customer identification, online services and the mobile marketplace, for online payments, OAuth and network authentication. We faced several problems with scalability and the frequent changes in our data model as services changed on a daily basis, and decided to build our own software to meet our needs. MongoDB's sharding and schema free document model made it a perfect fit for our in-house solution. The system is now designed to manage 12 million customers, 3000 request per second and availability of 99.9%. In six months we were able to build the new system that effectively connects the our various systems and partners, leading to a simpler and more streamlines system for access. In this talk we will discuss how we build this system from the ground up with MongoDB, Storm and Tomcat REST Services.TRANSCRIPT
Adding Flexibility and
Scalability to Bouygues
Telecom with MongoDB
Pierre-Alban DEWITTE
@__pad__
Bouygues Telecom
MongoDB World – 06/24/2014
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Bouygues Telecom
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Who is speaking ?
@__pad__
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Agenda
Adding Flexibility and Scalability to
Bouygues Telecom with MongoDB
1. Existing problems
2. Design choices
3. Build
4. A few steps back
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Agenda
1. Existing problems
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Existing problems
Consumer Customers
Existing Sytem Compagny Customers
LDAP access
Micropayment system
Identity and Oauth management system
Network Connexion system
ETL
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Existing problems
Two years delay
Schema customization
very hard to design and
implement
Performance issues
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Existing problems
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Agenda
1. Existing problems
2. Design choices A. MongoDB
B. Tomcat
C. Storm
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Design choices - MongoDB
Schema less data integration
High availability
Sharding
Less expensive data storage
allowing duplication
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
POC between Tomcat and
NodeJS
We choose our battle,
MongoDB !
Design choices - Tomcat
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Design choices - Storm
Distributed real-time computation system
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Design choices - Storm
MongoDB database
REST Micropayment
system
Identity and Oauth management system
Network Connexion system
STORM
Consumer Customers
Compagny Customers
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Agenda
1. Existing problems
2. Design choices
3. Build
A. Storm topology
B. Schema design
and refactor
C. DevOps
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Storm topology
Customer files are pushed every night
Read file line by line
1
… DetectFile
Spout ProcessLine
Bolt
2
line
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Storm topology
Emitting tuple for each set of functional
collections
ProcessLine Bolt
4
Oauth UpdaterBolt
Identity UpdaterBolt Transform a line into a
document & check delta
3
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Storm topology
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Storm topology
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Storm topology
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Design choices - Storm
Message failure handle
ack(Object msgId)
failed(Object msgId)
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Design choices - Storm
We scaled and easily !
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - Schema design and refactor
Conception User
- Name - Compagny - Billcycle - Payment
Mode
Access Point
- Id - Type - Value
1
1..n
Conception
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - Schema design and refactor
Develo
pm
ent
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - Schema design and refactor
Qualification
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - Schema design and refactor D
evelop
men
t
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - Schema design and refactor
« That works »
Qualification
Conception
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - Schema design and refactor St
ress
Tes
t
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - Schema design and refactor
Conception Conception
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - Schema design and refactor
Conception Conception
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - Schema design and refactor
Develo
pm
ent
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - Schema design and refactor
Develo
pm
ent
Qualification
Conception
Stre
ss T
est
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - Schema design and refactor
PERFECT !
Develo
pm
ent
Conception
Stre
ss T
es
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - DevOps
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - DevOps
Tooling first
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - DevOps
Moving the line between Dev and Ops
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Build - DevOps
Internal training by development team
Redaction of a play-book dedicated to ops
Pre production tests played by both team
Early write of stress tests, played during
qualification tests
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
6 months later
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Agenda
1. Existing problems
2. Design choices
3. Iterations during build
4. A few steps back
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
A few steps back
Apache Tomcat Apache STORM
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
A few steps back
1. Choose your battle
2. Use the right tool for the
right job
3. Be prepare to fail and to
rework
4. To move organization,
training is a key
Thank you for listening
Questions ?
Further talks @__pad__
Pierre-Alban DEWITTE @__pad__ #MongoDBWorld
Photo credits
100 m start : http://fr.wikipedia.org/wiki/100_m%C3%A8tres_%28athl%C3%A9tisme%29#mediaviewer/Fichier:Mens_100m_finals_British_Champs_and_Olympic_Trials.jpg by Paul Foot from Birmingham, UK Question mark block : https://www.flickr.com/photos/jarbo/9379813470 by Jared Cherup Pelleteuse orange : http://fr.123rf.com/photo_3669950_un-grand-pelleteuse-orange-stationne-a-un-chantier-de-construction.html by Stephen Mcsweeny Punaise : https://www.flickr.com/photos/24362608@N05/3501112978/sizes/l/in/photolist-f5R8g4-6kiVfR-6koahu-6ko7US-6ko8Qh-d9NUKU-nDi2eb-ffg13f-8h56wx-cgAcib-hchCtD-decZ4p-6kocrL-6kj2J6-5doxaw-gbTPmK-nCFBBq-672Snf-2sCzvw-e1zAjM-8voRbc-c9Rh1m-amFFGt-2iZNBq-cFSnFU-81Ckk4-2XHZAy-9Ggpfw-m8FfKz-8hW6r5-4xSuxC-awXsp4-5aVn7g-fbXVHZ-9GAPLX-9qr7uU-fcddgA-cP1EN7-np2q92-6V8oBT-cenSsb-cyzaEd-8h5a2F-6V2b3F-ch1RME-fJ52s3-9XthVN-kBs5mW-6qSPaF-5cA9Qb/ par dractrain94 Une longue vue qui louche : https://www.flickr.com/photos/la_bretagne_a_paris/3847733265/ par Yann Caradec NASA-Apollo8-Dec24-Earthrise : http://www.hq.nasa.gov/office/pao/History/alsj/a410/AS8-14-2383HR.jpg par NASA / Bill Anders