CSEP 552: Lab 4 part 3 design questions
Design draft due Monday, December 7 at 11:59pm on Gradescope.
Here are some questions to help you design your lab 4 part 3 protocol, based on the discussion in lecture and the lab 4 part 3 walkthrough slides.
Please choose at least 3 questions below that you think are interesting/challenging, and briefly sketch your ideas or questions about them. Submit your results as a PDF to Gradescope. We will then discuss these issues in class on December 8.
Two-phase commit
Recall that a group can be a participant in a transaction or the coordinator of a transaction. There is exactly one coordinator per transaction and any number of participants. The coordinator is typically also a participant.
- How do you make sure transactions don't interfere with each other? A group may be participating simultaneously in multiple transactions, some as coordinator and some as just a participant.
- How does each type of server learn that a transaction succeeded/failed?
- How to handle transactions that both read and write the same key (eg, swap)?
- More specifically, in a swap operation, you need to read both keys and then write those values to the other key. How will your system read the values and gather them together? How will your system then communicate the values to the participants who need to do the writes?
- At what point in the protocol can we respond to the client with the result?
Who is responsible for sending this response?
- Hint: The answer is not "after phase 2 is complete".
- Given your answer to the previous question, what is the point of phase 2? Can we get rid of phase 2 entirely?
Aborts and retries
- What should the coordinator and participants do in the case of a failed transaction?
- How to handle transactions that abort and need to retry?
- The application layer (ie, the test framework) should never observe aborts. Your system must hide them by retrying. Which part of your system will be responsible for retrying? (Participants, Coordinators, ShardMaster, Clients?)
- How to handle a dropped PrepareOk message?
- How to handle the case where you receive an Abort for a transaction you've never heard of before? What about the case where that happens and then later you receive a Prepare for that same transaction?
- How to handle a dropped CommitOK / AbortOK?
Reconfiguration
- How do we ensure a transaction completes entirely in one configuration?
- What should the coordinator do when it receives a new configuration during a transaction?
- What should the coordinator do when it discovers a participant isn't in the same configuration?
- Suppose we are a participant that just underwent reconfiguration, can we safely ignore transaction messages from an outdated configuration?
- Is it possible for a transaction to abort in one configuration and then be retried in a later configuration?
- How to avoid livelock where continuous stream of transactions prevents reconfiguration because the group is always executing a transaction?
- How to handle a dropped client response message across a reconfiguration
boundary?
- How is this different (if at all) from the corresponding single-key scenario from part 2?