16-02-2011, 04:58 PM
RPC.ppt (Size: 333.5 KB / Downloads: 81)
Remote Procedure Call
RPC Timeline
RCP Components
• Protocol Stack
– BLAST: fragments and reassembles large messages
– CHAN: synchronizes request and reply messages
– SELECT: dispatches request to the correct process
• Stubs Bulk Transfer (BLAST)
• Unlike AAL and IP, tries to recover from lost fragments
• Strategy
– selective retransmission
– aka partial acknowledgements
BLAST Details
• Sender:
– after sending all fragments, set timer DONE
– if receive SRR, send missing fragments and reset DONE
– if timer DONE expires, free fragments
• Receiver:
– when first fragments arrives, set timer LAST_FRAG
– when all fragments present, reassemble and pass up
– four exceptional conditions:
• if last fragment arrives but message not complete
• send SRR and set timer RETRY
• if timer LAST_FRAG expires
• send SRR and set timer RETRY
• if timer RETRY expires for first or second time
• send SRR and set timer RETRY
• if timer RETRY expires a third time
• give up and free partial message
BLAST Header Format
• MID must protect against wrap around
• TYPE = DATA or SRR
• NumFrags indicates number of fragments
• FragMask distinguishes among fragments
– if Type=DATA, identifies this fragment
– if Type=SRR, identifies missing fragments
Request/Reply (CHAN)
• Guarantees message delivery
• Synchronizes client with server
• Supports at-most-once semantics
CHAN Details
• Lost message (request, reply, or ACK)
– set RETRANSMIT timer
– use message id (MID) field to distinguish
• Slow (long running) server
– client periodically sends “are you alive” probe, or
– server periodically sends “I’m alive” notice
• Want to support multiple outstanding calls
– use channel id (CID) field to distinguish
• Machines crash and reboot
– use boot id (BID) field to distinguish
Synchronous vs Asynchronous Protocols
• Asynchronous interface
send(Protocol llp, Msg *message)
deliver(Protocol llp, Msg *message)
• Synchronous interface
call(Protocol llp, Msg *request, Msg *reply)
upcall(Protocol hlp, Msg *request, Msg *reply)
• CHAN is a hybrid protocol
– synchronous from above: call
– asynchronous from below: deliver