Download Using the Isis2 Library to Build Scalable High

Transcript
So why offer all these other options? There are really two kinds of reasons. The more important‐
sounding one is that the other options can be useful in implementing more sophisticated asynchronous algorithms. This is especially true for the CausalSend and CausalQuery. Yet we are quite aware that many (perhaps most) developers will never need to learn how they work or why they exist. Don’t feel any sense of obligation to do so unless you are curious about the topic, or are worried about the risk of relatively obscure delivery ordering issues that might violate application correctness. SafeSend takes us even further into a complicated issue, namely durability. As mentioned earlier, SafeSend is our name for the Paxos protocol; the key guarantee it provides is that if any group member delivers a message, every member will deliver that message, unless it crashes first, and in the same order too. This is a useful property when communicating to the outside world: if a recipient talks to an outside user, or updates a file or a database, it can be very helpful to know that all the other replicas, or users, will see the same thing. One difference between SafeSend and Paxos is that in most large‐scale Paxos deployments, one actually uses two groups: a group of acceptors (think of these as processes that maintain a database, probably using a quorum architecture) and a second group of learners (think of these as being, for example, cache servers that monitor the database and keep read‐only copies of popular items). But in Isis2 a single group plays both roles. More specifically, in Isis2 one uses SafeSend within some group, specifying the number of members that should play the acceptor role. These will be the first  members in any view (you get to specify the value for ). The idea is that the acceptors will assure the durability of the multicast, but then it will be delivered via the standard upcall API in all group members: all members are learners. A second difference relates to how one uses SafeSend: very often, in Isis2, an application is somehow wrapping a service, for example by maintaining one replica of a database or file or some other kind of application next to each group member. The multicasts contain inputs that are passed to these replicas on arrival. Notice the inversion of layers: in standard Paxos deployments, the acceptors are the database. With Isis2 applications, the group is more likely to be a communication front‐end that talks to the database replicas. As we’ll now see, this leads to some details one wouldn’t normally discuss in a paper on Paxos. On the other hand, relatively few researchers have ever really worked with Paxos in situations where it functions as a multicast and talks to some form of external service. The complications involve the handling of total group failures: cases where a message is in the system, and while it is being delivered, all members of a group crash (perhaps, Amazon West just had a data‐center wide power outage). With SafeSend we run into an issue here: what if a message was delivered to some group members (but not all), and then the group crashes. Later it restarts. Should we replay that partially delivered message? Not worry about it? In fact Isis2 lets you decide: 
You can call g.SafeSendThreshold to tell the system how many “copies” of a message are needed for durability. For many purposes, 3 seems to be best. But any value up to the full size of the group is permitted.