High-impact
refactors
keeping the
lights on
@Kartones
Diego Muñoz
Slide 2
Slide 2 text
01.
What
02.
Why
03.
How
04.
When
Agenda
Slide 3
Slide 3 text
What
Slide 4
Slide 4 text
What
Slide 5
Slide 5 text
What
Slide 6
Slide 6 text
Why
Slide 7
Slide 7 text
Why
Slide 8
Slide 8 text
Why
Slide 9
Slide 9 text
How
Slide 10
Slide 10 text
Mega
structures
How
Slide 11
Slide 11 text
Mega
structures
How
Slide 12
Slide 12 text
DB
High-frequency
selling
How
CMS
API
CRUD
Current (simplified)
flow
Slide 13
Slide 13 text
How
Extend,
not modify*
API
DB
High-frequency
selling
CRUD
CMS
REDIS
EVENT
BUS
EVENT
BUS
APU
*do modify if needed to allow
extension
Slide 14
Slide 14 text
Patterns &
Practices
- Parallel change
- Strangler
How
API
DB
High-frequency
selling
CRUD
CMS
REDIS
EVENT
BUS
EVENT
BUS
APU
Slide 15
Slide 15 text
How
API
DB
High-frequency
selling
CRUD
CMS
REDIS
EVENT
BUS
EVENT
BUS
APU
Patterns &
Practices
- Event Bus
- Cursor-based
- N writers/readers
Slide 16
Slide 16 text
How
API
DB
High-frequency
selling
CRUD
CMS
REDIS
EVENT
BUS
EVENT
BUS
APU
Patterns &
Practices
- Event Sourcing
Slide 17
Slide 17 text
How
API
DB
High-frequency
selling
CRUD
CMS
REDIS
EVENT
BUS
EVENT
BUS
APU
“Build exciting
things with boring
nice technologies”
- Python 3.6
· Strongly typed (Mypy)
· Dockerized
- Redis with LUA
- AWS Kinesis
github.com/ticketea/pynesis
Slide 18
Slide 18 text
When
Slide 19
Slide 19 text
When
Continous Iteration
- No hard deadline
- Desired: soon :-)
Slide 20
Slide 20 text
Latest benchmark:
~4100 ops/sec
- Single CPU core, 20k
tickets, 50k concurrent
users
- Attacking internal API
- Room for optimization
When
Slide 21
Slide 21 text
Current status:
- Free events
- Paid events on their way
· Play safe
(money involved!)
· Lots of payment methods
When