Wedding Package — System Design

Book Mbak Utari's tent, catering and sound over messages that get lost: sagas, idempotency, outbox. 15 levels, right in the browser.

What the levels ask

  1. The first booking of the Besar season: Mr. Harun's daughter marries on the 12th. Ms. Utari's laptop asks each vendor in turn and stops at the first no, without cancelling anything. Mrs. Yanti already holds another hajatan on that date. Pick the order of asking so that no vendor's book holds the 12th for a booking that fell through.
  2. Mrs. Lastri's son marries on the 14th, and this time anyone may refuse. Ms. Utari's laptop takes the family's down payment, pays each vendor who agrees their DP, and keeps how to undo each step in urung. Pick how to undo when a vendor refuses, so every DP comes back and Mrs. Lastri gets her money back whole.
  3. Mr. Bayu's sister marries on the 16th. Mr. Dodi is already full, so the tent and the catering are cancelled. The signal is bad: a message may arrive twice, and a reply may be lost so that Ms. Utari's laptop sends the BATAL again. Fill Mr. Jaya's BATAL handler so his DP goes back exactly once.
  4. Ms. Utari is at the Wedding Fair in town for three days. Without her, the vendors tell each other by events: Mr. Jaya books on paket.masuk, Mrs. Yanti on tenda.siap, Mr. Dodi on katering.siap. Mr. Karim's niece signs up for the 18th. Pick the events that make Mr. Jaya cancel his tent, whatever fails after him.
  5. Ms. Utari is back and holds the plan again. Ms. Wulan books a package for the 20th. The carrier delivers every message at least once: a message whose handler had not finished when a phone died is delivered again as soon as the phone is back, with the same pesan.id. Fill the guard in Mr. Jaya's PESAN handler so the tent's DP is taken once.
  6. The neighbourhood head's son marries on the 22nd with two tents, front and back. Ms. Utari's laptop now resends any PESAN without a reply within half a second, and every resend is a new message with a new pesan.id. Pick the key Mr. Jaya uses to recognise work he has already written down.
  7. Ms. Utari puts a board on her office wall: every vendor announces the bookings they write down, and the board shows them to the families who come in. Mrs. Ratna books for her sister, the 23rd. Pick how Mr. Jaya writes the booking down and announces it, so the board holds what is in his book, even if his phone dies halfway.
  8. Mr. Piksel's sister marries on the 24th. The signal at Mr. Dodi's house is slow in the afternoon: his reply may come after Ms. Utari's laptop's 600 ms deadline, or the message may be held up on the road. Pick what Ms. Utari's laptop does when time runs out, so this wedding gets its tent, catering and sound.
  9. Ms. Utari opens the Budget Catering Package, and 24 families sign up in the same second. Mrs. Yanti's phone serves one message every 40 ms with two waiting; the rest are answered Sibuk (busy). Ms. Utari's laptop tries up to six times. Pick the wait before trying again, so all 24 families are served without a flood of messages.
  10. Karang Taruna built Ms. Utari a booking gateway: families ask about free dates through the gateway, and the gateway passes the question to the vendor. This afternoon Mr. Dodi is at a hajatan in the next village with no signal. Set the gateway's breaker so that people asking Mr. Dodi do not wait in vain, the other vendors are still served, and Mr. Dodi is served again as soon as he is back.
  11. The gateway now checks every family's token once, allows five requests a second, and the vendors trust the x-pengguna the gateway writes. Ms. Wulan books a tent for the 26th, and Bagas tries to cancel it by writing x-pengguna: wulan himself. Pick the headers the gateway passes on to the vendor.
  12. Dina complains that her booking was slow. Ms. Utari wants to see one whole trace for it: her laptop starts an x-jejak and sends its rentang as x-induk. In the middle of her PESAN handler, Mrs. Yanti orders chickens from Mr. Tono. Pick the headers of Mrs. Yanti's request to Mr. Tono so the chickens show up under the catering, in the same trace.

And more, 15 levels in all.