News for hackers. Stuff that matters.

alebairos

My safety (of my group) is what really matters.
Chapter 7 of Alex Xu’s Volume 2 has a nice description of most of the problems. Below, a post that has a good level of details.

https://devinz1993.medium.com/book-notes-system-design-inter...

Extracted from the post:

Chapter 7. Hotel Reservation System Functional requirements: - View hotels and rooms. - Reserve a hotel room. - Add/delete/update a hotel room. - Support overbooking. Non-functional requirements: - Support high concurrency. - Moderate latency (a few seconds for reservation). Choose a relational database for the read-heavy workload and ACID properties. Include an idempotency key in the API for making reservations to avoid double booking. Use the microservice architecture and use remote procedure calls for inter-service communication. Keep a pre-populated room type inventory (for 2 years ahead) to support reservations by room type (instead of by room id). Concurrency control: - Pessimistic locking is prone to deadlocks and tends to have bad performance. - Optimistic locking is usually faster but performance dramatically drops when contention is heavy. How to scale up? - Shard the database by hotel since most queries need to filter by it. - Cache inventory information (aggregates) in Redis to reduce database load and improve read performance. Use the same service to manage reservations and the inventory to avoid data consistency issues that require 2PC or Saga.

Re:Mac Pros, Ara, and Modularity on Wednesday October 30, 2013 @07:40PM (#6644309)
Can't wait to see the first prototype for an organic based cell phone. No modules, but software controlled morphing parts.
Re:Ask HN: Where is the Django community? on Monday July 18, 2011 @05:50PM (#2778433)
"All my Django projects ended up being a big mess".

maxklein, it seems u lack descent programming skills, since my experience with django is completely different. Most of the time the problem is with who codes, not the framework or tool.