Consider the following code snippet, where a voting service is accessed through two RPC calls: is_vote_cast(voter_id):
Fantastic news! We've Found the answer you've been seeking!
Question:
Consider the following code snippet, where a voting service is accessed through two RPC calls:
is_vote_cast(voter_id): returns if the voter specified by the 'voter_id' has already cast her vote ('YES ' or 'NO)
cast_vote(cand_id, voter_id): casts the vote for the specified candidate by the specifier voter
voter_id = '243545'
cand_id = '90888'
if (proxy.is_vote_cast(voter_id) == 'NO') {
proxy.cast_vote(cand_id, voter_id)
}
Describe the ramification of three RPC call semantics: (i) Maybe, (ii) at-least-once, and (iii) at-most-once, on these two calls. Which semantic is best fit for which functions?
Related Book For
Computer organization and architecture designing for performance
ISBN: 978-0136073734
8th edition
Authors: william stallings
Posted Date: