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'
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?
Step by Step Solution
There are 3 Steps involved in it
consider the following code snippet where a voting service is accessed through two RPC calls isvotecastvoterid returns if the voter specified by the voterid has already cast her vote YES or NO castvot... View full answer
Get step-by-step solutions from verified subject matter experts
