1 of 11

Section 3: Lab 2

(Primary Backup)

CSE 452 Spring 2026

2 of 11

Announcements

  • Lab 1 Design doc feedback on Gradescope (to be released)
    • Review all comments => page through even if full credit
  • Pset 2 due tomorrow (4/17)
  • Lab 2 Design Doc due tomorrow (4/17), one submission per group
  • Lab 2 code due next Friday (4/24)
  • Review syllabus for late day policy
    • 48 hr grace period for lab 2
    • 48 hr grace period for Pset 2
    • NO grace period for design doc

3 of 11

If you haven’t already...

Add your partner to your GitLab repo specified by following these steps:

  • Going to the designated GitLab repo that y’all decided to work on
  • Going to Members
  • Looking up your partner’s NETID
  • Setting their role to Maintainer/Developer
  • Click “Invite”

4 of 11

Recap 6 Rules:

  1. Primary must wait for backup to accept/execute each op before doing op and replying to client
  2. Backup must accept forwarded requests only if view is correct
  3. Primary in view i+1 must have been backup or primary in view i
  4. Non-primary must reject client requests
  5. ViewServer cannot move on to view i+1 until ack from primary in view i is received
  6. Every operation must be before or after state transfer (Problem with processing requests during a state transfer)

5 of 11

Who are the players?

Pool of Idle Servers

Client

Primary

Backup

View Server

Request

Forward Request

Forward

Ack

Response

Ping

Ping

Ping

GetView

What messages do they send/receive?

6 of 11

Design Doc Group Share

  • Form a group of 2-3 people, pair up with someone other than your partner
  • Go over each section of the design doc
  • Share and discuss the differences and similarities

7 of 11

Lab 2 Questions to Consider: View Server

View Server

  • What data structures does your view server use to track alive nodes?
  • When should a client communicate with the view server?
  • What are the cases where you can do a view change?
  • How do view changes affect the state on your servers?

8 of 11

Lab 2 Questions to Consider: Replication

Replication

  • How does the primary verify that a request has successfully been replicated to the backup?
  • When might a node ignore a forwarded request it receives?
  • How do you ensure consistent ordering of request execution between the primary and backup?
  • How do you handle simultaneous client requests arriving at the primary?
  • What happens when a forwarded request (or its response) is dropped between the primary and backup?
  • Are you using a separate forwarded request message or reusing the same request message type?

9 of 11

Lab 2 Questions to Consider: State Transfer

State Transfer

  • How do you know when to start a state transfer?
  • What conditions should a node check if it receives a state transfer message?
  • What state do you keep to track the status of a state transfer?
  • How do you handle client requests during a pending state transfer?
  • What happens if a state transfer message is dropped?
  • What happens if an acknowledgment of a state transfer is dropped?

10 of 11

Lab 2 Questions to Consider

View Server

  • What data structures does your view server use to track alive nodes?
  • When should a client communicate with the view server?
  • What are the cases where you can do a view change?
  • How do view changes affect the state on your servers?

Replication

  • How does the primary verify that a request has successfully been replicated to the backup?
  • When might a node ignore a forwarded request it receives?
  • How do you ensure consistent ordering of request execution between the primary and backup?
  • How do you handle simultaneous client requests arriving at the primary?
  • What happens when a forwarded request (or its response) is dropped between the primary and backup?
  • Are you using a separate forwarded request message or reusing the same request message type?

State Transfer

  • How do you know when to start a state transfer?
  • What conditions should a node check if it receives a state transfer message?
  • What state do you keep to track the status of a state transfer?
  • How do you handle client requests during a pending state transfer?
  • What happens if a state transfer message is dropped?
  • What happens if an acknowledgment of a state transfer is dropped?

11 of 11

Lab + Design doc resources