SlideShare a Scribd company logo
1 of 40
The world is not black and white
03.09.2016 Eric Reiche
1
Eric Reiche
26, married, has a daughter
Head of Software Engineering @ FlixBus
Working with 50 people in 7 teams
People from 17 countries
Offices in Berlin, Munich, Kharkiv
Who is this guy?
2
• Technology company
• AirBnB has no flats
• Uber has no cars
• FlixBus has no buses!
• One big brand
• One endpoint for customers
FlixBus
3
Source: MeinFernbus.de, 2013
March 2012
4
Source: MeinFernbus.de
July 2013
5
Source: MeinFernbus.de
December 2014
6
Source: FlixBus.de, 15.08.2016
August 2016
• About 1.000 buses
• 250 bus companies
• 13.000 agencies
• 100.000 tickets daily
• Europe’s largest
long-distance
bus operator
7
2012
• We started with Symfony2, Doctrine, Capistrano
• SOA: Frontend, API, Backoffice
• Webshop for tickets, including payments
• 3 Developers
• First commit to go-live in 3 months
Let‘s go back again
8
Was it right?
Yes!
2012
9
Is it still right?
Of course not.
2016
10
• Without hacking a payment system together in a
few weeks, we would have never made it this far.
• Without sacrificing code quality, we wouldn‘t
have gone live in 3 months.
What‘s the point?
11
BUT!
Over time, these practices need evolution and
revolution.
Be careful with assumptions.
2016
12
"Walking on water and developing software from a
specification are easy if both are frozen.”
- Edward V. Berard
13
• Handle changing requirements
• Only way to grow as fast as we did
• React to the market
• The fast eat the slow
• Don’t use it blindly
• (Agile development makes no sense for NASA)
This is why we are agile
14
• Payment provider changed 6 times
• Payment module rewritten 4 times
• Jenkins for deploys
• Peer code-review
• SOA was a very good idea
• (Our execution wasn‘t)
2016
15
• Team skills
• Symfony2 just came out of beta
• And seemed to do lots of things right
• PHPs strengths are in rapid prototyping
• Runs anywhere (cheap hosting)
• Started bare-metal
• Slowly moving to Kubernetes
Image source: http://imgur.com/gallery/0S5spVm
Why PHP?
16
Back to the future
17
How to handle > 1 million hits per day?
• Caching on load balancer
• NginX can handle a LOT of static traffic
• Caching expensive calculations in memcache/redis
• Queuing transactions
• PDF generation
• Emails
18
• You can start your company with prototype code
• As the project grows, so do the requirements
• Enterprise applications are possible, but need the
same architecture planning as on other platforms
• There are no bad languages, just bad code
(except maybe Visual Basic ;) )
Architecture
19
• Files - only work as long as you have a single server
• MySQL – super heavy
• MySQL Memcache interface – breaks by replication
• Memcache – What if you need to reboot?
• Redis – cluster, persistence
Session management
20
Source: https://twitter.com/codinghorror/status/347070841059692545?
Best practices at FlixBus
21
• Use UTF-8.
• Use mb_*
• Again: don‘t make assumptions.
• UTF-8 might be needed in unexpected places
• E-Mail addresses (International domain names)
Encoding
22
• People have exactly one canonical full name.
• People have exactly one full name which they go by.
• People have, at this point in time, exactly one canonical full name.
• People have, at this point in time, one full name which they go by.
• People have exactly N names, for any value of N.
• People’s names fit within a certain defined amount of space.
• People’s names do not change.
• People’s names change, but only at a certain enumerated set of events.
• People’s names are written in ASCII.
• People’s names are written in any single character set.
• People’s names are all mapped in Unicode code points.
• People’s names are case sensitive.
• [...]
• People whose names break my system are weird outliers. They should have had solid, acceptable names,
like 田中太郎.
• People have names.
http://bit.ly/2aW1AQf / https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
Falsehoods Programmers Believe About Names
23
• Monoliths will blow up your database
• Master-Master hot-standby replication (for now)
1. stop replication
2. apply migration
3. re-sync
4. repeat on other master
• Takes hours or days
Database scaling
24
How to prevent „Works on my machine“?
• Make it EASY to get a standardized, local
environment running (Vagrant, Docker)
• Have enough staging environments for everyone
• Make deploys easy
What about staging?
25
• We slice our database dumps for staging and dev
• Anonymize names, emails, phone numbers...
• Remove rides older than one month
• Remove everything attached to these rides
• Orders, Reservations, Customer data
• Runs for days
• Compressed 4GB
What about staging databases?
26
• Nice for consistency
• Prevents decoupling & Microservices
• At some point it will explode
• Now you need to move it to the application layer
• And spend a year refactoring
Foreign key constraints
27
• We used them quite a lot
• Changing them becomes a real PITA
• Migrations are expensive
• JOINs are also expensive
• Depends on the situation
• Recently migrated an ENUM for currencies to
integer in 10 biggest tables
• It took us almost a week – really painful
ENUMs
28
• Small applications can scale SO MUCH easier
• APIs can be reused for other things
• You can start by using bundles which don‘t share
anything (but be pedantic!)
• Use event listeners (but still think about what
you‘re doing/coupling)
SOA / Decoupling
29
• Database transactions can become too big easily
• Try to keep them as small as possible
• Do load testing!
Transactions
30
PM: How long does this story take?
You: 13 points.
PM: And without tests?
You: 21 points.
PM: Why?
You: Because then we have to test everything by
hand and will notice some bugs only later.
Testing
31
• Shared Percona cluster for Business Intelligence
• Very fast kick-off
• Stuck with dependencies between departments
• API would have been nice
Shared database
32
• 2013 we assumed people know what they‘re doing
• Permission system was based on trust
• (which means non-existent)
• Not possible anymore for 1000+ people
• Legal regulations
Security & Permissions
33
• Don‘t use technology „just because“
• Understand what advantages and disadvantages a technology has
• Try to keep your stack small at the beginning
• Utilize the talent in your team once you‘re big enough
By Jeremykemp at English Wikipedia, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=10547051
Gartner Hype Cycle
34
• ALWAYS USE UTC!
• It doesn‘t really cost you anything extra
• All projects will grow (or die)
• There are libraries which make your life easier
• https://github.com/celest-time/celest
• It‘s by one of our guys
Time zones
35
• Started with Excel/Word files
• Tried Pootle
• Needs to be idiot proof
• For translation agencies
• Developed our own
• Github / Gitlab support
• Merge Requests
• SPA will be open source
Announcement will be made on http://flix.tech
Translations
36
• Bahn-strike effect: 10x traffic + transactions (!)
• TV mentioning
• If your application is built with scalability in mind,
just fire up some EC2s.
• What happens if the
peak stays?
• Not everything is
easily scalable
Peaks
37
• Don‘t be scared to make a decision
• Always have a good reason
• Plan to re-plan
• If plan A doesn‘t work, the alphabet has 25 more
letters
• Trial & Error is comparably cheap in IT
Summary
38
Want to learn from a big team of awesome people?
Join us in Berlin, Munich or Kharkiv!
https://github.com/flix-tech/jobs
We‘re hiring!
39
Questions?
@ericreiche
eric.reiche@flixbus.com
Feedback welcome: http://bit.do/flix-eric
Thank you!

More Related Content

What's hot

Implementing real time web applications with Django
Implementing real time web applications with DjangoImplementing real time web applications with Django
Implementing real time web applications with DjangoKristian Houlberg Øllegaard
 
Design for Scale / Surge 2010
Design for Scale / Surge 2010Design for Scale / Surge 2010
Design for Scale / Surge 2010Christopher Brown
 
What you need to know about the Math Stack: MathML, MathJax, HTML5, and EPUB 3
What you need to know about the Math Stack: MathML, MathJax, HTML5, and EPUB 3What you need to know about the Math Stack: MathML, MathJax, HTML5, and EPUB 3
What you need to know about the Math Stack: MathML, MathJax, HTML5, and EPUB 3Autumn Cuellar
 
Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Ricard Clau
 
RPA on Azure with .Net
RPA on Azure with .NetRPA on Azure with .Net
RPA on Azure with .NetMarco Parenzan
 
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane EcosystemDownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane EcosystemFITC
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksFITC
 
Olympya web-tools 2011
Olympya web-tools 2011Olympya web-tools 2011
Olympya web-tools 2011Paulo Mattos
 
Tiki.vn - How we scale as a tech startup
Tiki.vn - How we scale as a tech startupTiki.vn - How we scale as a tech startup
Tiki.vn - How we scale as a tech startupTung Ns
 

What's hot (10)

Implementing real time web applications with Django
Implementing real time web applications with DjangoImplementing real time web applications with Django
Implementing real time web applications with Django
 
Design for Scale / Surge 2010
Design for Scale / Surge 2010Design for Scale / Surge 2010
Design for Scale / Surge 2010
 
What you need to know about the Math Stack: MathML, MathJax, HTML5, and EPUB 3
What you need to know about the Math Stack: MathML, MathJax, HTML5, and EPUB 3What you need to know about the Math Stack: MathML, MathJax, HTML5, and EPUB 3
What you need to know about the Math Stack: MathML, MathJax, HTML5, and EPUB 3
 
Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014
 
React - An Overview
React - An OverviewReact - An Overview
React - An Overview
 
RPA on Azure with .Net
RPA on Azure with .NetRPA on Azure with .Net
RPA on Azure with .Net
 
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane EcosystemDownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
DownTheRabbitHole.js – How to Stay Sane in an Insane Ecosystem
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 
Olympya web-tools 2011
Olympya web-tools 2011Olympya web-tools 2011
Olympya web-tools 2011
 
Tiki.vn - How we scale as a tech startup
Tiki.vn - How we scale as a tech startupTiki.vn - How we scale as a tech startup
Tiki.vn - How we scale as a tech startup
 

Similar to The world is not black and white – Impact of decisions over the lifetime of a very successful software project

Citizen Developer Tools (session at SharePoint Saturday Houston 4/28/2018) by...
Citizen Developer Tools (session at SharePoint Saturday Houston 4/28/2018) by...Citizen Developer Tools (session at SharePoint Saturday Houston 4/28/2018) by...
Citizen Developer Tools (session at SharePoint Saturday Houston 4/28/2018) by...Antti Koskela
 
Citizen Developer Tools are not just for Citizen Developers (session at Share...
Citizen Developer Tools are not just for Citizen Developers (session at Share...Citizen Developer Tools are not just for Citizen Developers (session at Share...
Citizen Developer Tools are not just for Citizen Developers (session at Share...Antti Koskela
 
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20....Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...Javier García Magna
 
Citizen Developer Tools - session at SPS New England 10/20/2018
Citizen Developer Tools - session at SPS New England 10/20/2018Citizen Developer Tools - session at SPS New England 10/20/2018
Citizen Developer Tools - session at SPS New England 10/20/2018Antti Koskela
 
Chirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterChirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterJohn Adams
 
Silicon Valley Code Camp 2016 - MongoDB in production
Silicon Valley Code Camp 2016 - MongoDB in productionSilicon Valley Code Camp 2016 - MongoDB in production
Silicon Valley Code Camp 2016 - MongoDB in productionDaniel Coupal
 
Managing WorkSpaces at Scale | AWS Public Sector Summit 2016
Managing WorkSpaces at Scale | AWS Public Sector Summit 2016Managing WorkSpaces at Scale | AWS Public Sector Summit 2016
Managing WorkSpaces at Scale | AWS Public Sector Summit 2016Amazon Web Services
 
Mini-course "Practices of the Web Giants" at Global Code - São Paulo
Mini-course "Practices of the Web Giants" at Global Code - São PauloMini-course "Practices of the Web Giants" at Global Code - São Paulo
Mini-course "Practices of the Web Giants" at Global Code - São PauloOCTO Technology
 
Citizen Developer Tools @ Valo Solutions / Blue Meteorite Monday session
Citizen Developer Tools @ Valo Solutions / Blue Meteorite Monday sessionCitizen Developer Tools @ Valo Solutions / Blue Meteorite Monday session
Citizen Developer Tools @ Valo Solutions / Blue Meteorite Monday sessionAntti Koskela
 
What ya gonna do?
What ya gonna do?What ya gonna do?
What ya gonna do?CQD
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyComsysto Reply GmbH
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyComsysto Reply GmbH
 
QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes Abdul Basit Munda
 
Intro to cloud computing — MegaCOMM 2013, Jerusalem
Intro to cloud computing — MegaCOMM 2013, JerusalemIntro to cloud computing — MegaCOMM 2013, Jerusalem
Intro to cloud computing — MegaCOMM 2013, JerusalemReuven Lerner
 
Why real integration developers ride Camels
Why real integration developers ride CamelsWhy real integration developers ride Camels
Why real integration developers ride CamelsChristian Posta
 
Software Engineering in Startups
Software Engineering in StartupsSoftware Engineering in Startups
Software Engineering in StartupsDusan Omercevic
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Adam Dunkels
 
Realtime traffic analyser
Realtime traffic analyserRealtime traffic analyser
Realtime traffic analyserAlex Moskvin
 
Rakuten Ichiba_Rakuten Technology Conference 2016
Rakuten Ichiba_Rakuten Technology Conference 2016Rakuten Ichiba_Rakuten Technology Conference 2016
Rakuten Ichiba_Rakuten Technology Conference 2016Rakuten Group, Inc.
 

Similar to The world is not black and white – Impact of decisions over the lifetime of a very successful software project (20)

Citizen Developer Tools (session at SharePoint Saturday Houston 4/28/2018) by...
Citizen Developer Tools (session at SharePoint Saturday Houston 4/28/2018) by...Citizen Developer Tools (session at SharePoint Saturday Houston 4/28/2018) by...
Citizen Developer Tools (session at SharePoint Saturday Houston 4/28/2018) by...
 
Citizen Developer Tools are not just for Citizen Developers (session at Share...
Citizen Developer Tools are not just for Citizen Developers (session at Share...Citizen Developer Tools are not just for Citizen Developers (session at Share...
Citizen Developer Tools are not just for Citizen Developers (session at Share...
 
TXJS 2013 in 10 minutes
TXJS 2013 in 10 minutesTXJS 2013 in 10 minutes
TXJS 2013 in 10 minutes
 
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20....Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
 
Citizen Developer Tools - session at SPS New England 10/20/2018
Citizen Developer Tools - session at SPS New England 10/20/2018Citizen Developer Tools - session at SPS New England 10/20/2018
Citizen Developer Tools - session at SPS New England 10/20/2018
 
Chirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterChirp 2010: Scaling Twitter
Chirp 2010: Scaling Twitter
 
Silicon Valley Code Camp 2016 - MongoDB in production
Silicon Valley Code Camp 2016 - MongoDB in productionSilicon Valley Code Camp 2016 - MongoDB in production
Silicon Valley Code Camp 2016 - MongoDB in production
 
Managing WorkSpaces at Scale | AWS Public Sector Summit 2016
Managing WorkSpaces at Scale | AWS Public Sector Summit 2016Managing WorkSpaces at Scale | AWS Public Sector Summit 2016
Managing WorkSpaces at Scale | AWS Public Sector Summit 2016
 
Mini-course "Practices of the Web Giants" at Global Code - São Paulo
Mini-course "Practices of the Web Giants" at Global Code - São PauloMini-course "Practices of the Web Giants" at Global Code - São Paulo
Mini-course "Practices of the Web Giants" at Global Code - São Paulo
 
Citizen Developer Tools @ Valo Solutions / Blue Meteorite Monday session
Citizen Developer Tools @ Valo Solutions / Blue Meteorite Monday sessionCitizen Developer Tools @ Valo Solutions / Blue Meteorite Monday session
Citizen Developer Tools @ Valo Solutions / Blue Meteorite Monday session
 
What ya gonna do?
What ya gonna do?What ya gonna do?
What ya gonna do?
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes
 
Intro to cloud computing — MegaCOMM 2013, Jerusalem
Intro to cloud computing — MegaCOMM 2013, JerusalemIntro to cloud computing — MegaCOMM 2013, Jerusalem
Intro to cloud computing — MegaCOMM 2013, Jerusalem
 
Why real integration developers ride Camels
Why real integration developers ride CamelsWhy real integration developers ride Camels
Why real integration developers ride Camels
 
Software Engineering in Startups
Software Engineering in StartupsSoftware Engineering in Startups
Software Engineering in Startups
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
Realtime traffic analyser
Realtime traffic analyserRealtime traffic analyser
Realtime traffic analyser
 
Rakuten Ichiba_Rakuten Technology Conference 2016
Rakuten Ichiba_Rakuten Technology Conference 2016Rakuten Ichiba_Rakuten Technology Conference 2016
Rakuten Ichiba_Rakuten Technology Conference 2016
 

Recently uploaded

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Recently uploaded (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

The world is not black and white – Impact of decisions over the lifetime of a very successful software project

  • 1. The world is not black and white 03.09.2016 Eric Reiche
  • 2. 1 Eric Reiche 26, married, has a daughter Head of Software Engineering @ FlixBus Working with 50 people in 7 teams People from 17 countries Offices in Berlin, Munich, Kharkiv Who is this guy?
  • 3. 2 • Technology company • AirBnB has no flats • Uber has no cars • FlixBus has no buses! • One big brand • One endpoint for customers FlixBus
  • 7. 6 Source: FlixBus.de, 15.08.2016 August 2016 • About 1.000 buses • 250 bus companies • 13.000 agencies • 100.000 tickets daily • Europe’s largest long-distance bus operator
  • 8. 7 2012 • We started with Symfony2, Doctrine, Capistrano • SOA: Frontend, API, Backoffice • Webshop for tickets, including payments • 3 Developers • First commit to go-live in 3 months Let‘s go back again
  • 10. 9 Is it still right? Of course not. 2016
  • 11. 10 • Without hacking a payment system together in a few weeks, we would have never made it this far. • Without sacrificing code quality, we wouldn‘t have gone live in 3 months. What‘s the point?
  • 12. 11 BUT! Over time, these practices need evolution and revolution. Be careful with assumptions. 2016
  • 13. 12 "Walking on water and developing software from a specification are easy if both are frozen.” - Edward V. Berard
  • 14. 13 • Handle changing requirements • Only way to grow as fast as we did • React to the market • The fast eat the slow • Don’t use it blindly • (Agile development makes no sense for NASA) This is why we are agile
  • 15. 14 • Payment provider changed 6 times • Payment module rewritten 4 times • Jenkins for deploys • Peer code-review • SOA was a very good idea • (Our execution wasn‘t) 2016
  • 16. 15 • Team skills • Symfony2 just came out of beta • And seemed to do lots of things right • PHPs strengths are in rapid prototyping • Runs anywhere (cheap hosting) • Started bare-metal • Slowly moving to Kubernetes Image source: http://imgur.com/gallery/0S5spVm Why PHP?
  • 17. 16 Back to the future
  • 18. 17 How to handle > 1 million hits per day? • Caching on load balancer • NginX can handle a LOT of static traffic • Caching expensive calculations in memcache/redis • Queuing transactions • PDF generation • Emails
  • 19. 18 • You can start your company with prototype code • As the project grows, so do the requirements • Enterprise applications are possible, but need the same architecture planning as on other platforms • There are no bad languages, just bad code (except maybe Visual Basic ;) ) Architecture
  • 20. 19 • Files - only work as long as you have a single server • MySQL – super heavy • MySQL Memcache interface – breaks by replication • Memcache – What if you need to reboot? • Redis – cluster, persistence Session management
  • 22. 21 • Use UTF-8. • Use mb_* • Again: don‘t make assumptions. • UTF-8 might be needed in unexpected places • E-Mail addresses (International domain names) Encoding
  • 23. 22 • People have exactly one canonical full name. • People have exactly one full name which they go by. • People have, at this point in time, exactly one canonical full name. • People have, at this point in time, one full name which they go by. • People have exactly N names, for any value of N. • People’s names fit within a certain defined amount of space. • People’s names do not change. • People’s names change, but only at a certain enumerated set of events. • People’s names are written in ASCII. • People’s names are written in any single character set. • People’s names are all mapped in Unicode code points. • People’s names are case sensitive. • [...] • People whose names break my system are weird outliers. They should have had solid, acceptable names, like 田中太郎. • People have names. http://bit.ly/2aW1AQf / https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ Falsehoods Programmers Believe About Names
  • 24. 23 • Monoliths will blow up your database • Master-Master hot-standby replication (for now) 1. stop replication 2. apply migration 3. re-sync 4. repeat on other master • Takes hours or days Database scaling
  • 25. 24 How to prevent „Works on my machine“? • Make it EASY to get a standardized, local environment running (Vagrant, Docker) • Have enough staging environments for everyone • Make deploys easy What about staging?
  • 26. 25 • We slice our database dumps for staging and dev • Anonymize names, emails, phone numbers... • Remove rides older than one month • Remove everything attached to these rides • Orders, Reservations, Customer data • Runs for days • Compressed 4GB What about staging databases?
  • 27. 26 • Nice for consistency • Prevents decoupling & Microservices • At some point it will explode • Now you need to move it to the application layer • And spend a year refactoring Foreign key constraints
  • 28. 27 • We used them quite a lot • Changing them becomes a real PITA • Migrations are expensive • JOINs are also expensive • Depends on the situation • Recently migrated an ENUM for currencies to integer in 10 biggest tables • It took us almost a week – really painful ENUMs
  • 29. 28 • Small applications can scale SO MUCH easier • APIs can be reused for other things • You can start by using bundles which don‘t share anything (but be pedantic!) • Use event listeners (but still think about what you‘re doing/coupling) SOA / Decoupling
  • 30. 29 • Database transactions can become too big easily • Try to keep them as small as possible • Do load testing! Transactions
  • 31. 30 PM: How long does this story take? You: 13 points. PM: And without tests? You: 21 points. PM: Why? You: Because then we have to test everything by hand and will notice some bugs only later. Testing
  • 32. 31 • Shared Percona cluster for Business Intelligence • Very fast kick-off • Stuck with dependencies between departments • API would have been nice Shared database
  • 33. 32 • 2013 we assumed people know what they‘re doing • Permission system was based on trust • (which means non-existent) • Not possible anymore for 1000+ people • Legal regulations Security & Permissions
  • 34. 33 • Don‘t use technology „just because“ • Understand what advantages and disadvantages a technology has • Try to keep your stack small at the beginning • Utilize the talent in your team once you‘re big enough By Jeremykemp at English Wikipedia, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=10547051 Gartner Hype Cycle
  • 35. 34 • ALWAYS USE UTC! • It doesn‘t really cost you anything extra • All projects will grow (or die) • There are libraries which make your life easier • https://github.com/celest-time/celest • It‘s by one of our guys Time zones
  • 36. 35 • Started with Excel/Word files • Tried Pootle • Needs to be idiot proof • For translation agencies • Developed our own • Github / Gitlab support • Merge Requests • SPA will be open source Announcement will be made on http://flix.tech Translations
  • 37. 36 • Bahn-strike effect: 10x traffic + transactions (!) • TV mentioning • If your application is built with scalability in mind, just fire up some EC2s. • What happens if the peak stays? • Not everything is easily scalable Peaks
  • 38. 37 • Don‘t be scared to make a decision • Always have a good reason • Plan to re-plan • If plan A doesn‘t work, the alphabet has 25 more letters • Trial & Error is comparably cheap in IT Summary
  • 39. 38 Want to learn from a big team of awesome people? Join us in Berlin, Munich or Kharkiv! https://github.com/flix-tech/jobs We‘re hiring!

Editor's Notes

  1. In our case it‘s green and orange ;)
  2. All our busses are green, have a big distance between seats, snacks, drinks, free Wifi, electric sockets to charge your phone etc.
  3. First line, started a bit more than 4 years ago, connected 3 cities. In southern Germany, trains don’t have good connections because there are a lot of mountains. We went from this…
  4. …to this...
  5. … to this...
  6. …and this is today. As you can imagine, scaling this took some effort.
  7. .... because... next slide
  8. You obviously cannot handle all cases, but try to not put unneccessary barriers
  9. We do it with jenkins + vagrant
  10. This is a „good enough“ practice, not best practice
  11. Connecting 3rd party companies, selling your tickets via API, connecting business intelligence tools
  12. http://bit.ly/2aW1AQf
  13. FlixBus merge @ 17.02. DB is hard to scale if it‘s coupled
  14. We’re not the usual outsourcing project, our Kharkiv team is with us for over 3 years now
  15. Thank you for listening! If you have any questions, ask now or come talk to me or Thomas later, we will be around. If you prefer russian, you can talk to our awesome team!