Software Crafters
Meet-up22
Architecture Kata
Let's Introduce ourselves
What would you do, if you bumped your car into someone’s else and there was nobody around?
Timeline
2.00 - 3.00: Kick-off & discussion
3.00 - 4.00: Architecture Kata in mobs
4.00 - 4.50: Groups present their solutions
4.50 - 5.00: Retrospective
Consider Ambulance as a Service
MySQL
Database
Ambulance Web Server
Customer
Mobile App
Ambulance
Mobile App
Problem?
If one ambulance sends location once in 3 seconds
Pings in minute = 20
If 1000 Ambulance sends location once in 3 seconds
Pings in minute = 20,000
Pings in second = 333.33
One Ambulance
1000 Ambulance
Message Queues
Ambulance Web Server
Problem?
SELECT geo_hash(pickup_latitude, pickup_longitude), COUNT(1)
FROM ambulance_requests ar
JOIN patient p ON ar.patient_id = p.id
WHERE p.disease = 'Covid-19'
AND ar.date > date_sub(NOW(), INTERVAL 30 DAY)
GROUP BY 1;
10 Cases in a week vs 10 Cases in an hour
100 Rows vs 10000 Rows
Caches
When to cache? (examples)
Problem?
ambulance_id | datetime | lat | lng |
... | ... | ... | ... |
If 1000 Ambulance sends location once in 3 seconds
Pings in second = 333.33
Pings in minute = 20000
Pings in day = 28,800,000
Pings in month = 864,000,000
NoSQL pings
SQL
NoSQL
Let’s create something
Scalable Chat Application
BreakoutRooms
BreakoutRooms
BreakoutRooms
RETRO
Everyone discusses their solution
Discussion on what Kata is about
4.00 pm
3.00 pm