Domanda

Data in a system is collection of items i.e objects. These logical objects are implemented by a collection of physical copies called replicas. The replicas are physical objects, each stored at a single computer, with data data and behaviour that are tied to some degree of consistency by the system's operation.

My question are

1 Object should be physical and Replicas should be logical 2 Is replica exact copy or just part of original one i.e. enough information 3 Where replicas are stored and how many in number are they for single object? 4 When clients connect to object, are they accessing replica or original object?

I tried to find answers to my questions online, but couldn't so had to post on stackoverflow.

È stato utile?

Soluzione

The answer mostly depends on what "system" do you use. There's no general replication mechanism. However, answer to question #1 and #2 should be always the same: 1. Replica is a physical object 2. Replica is an exact copy. Almost every distributed system uses something home-grown. Here's some examples:

  • MySQL replication: client/server application. Transactions executed on master will be transferred to slaves. Number of configured slaves is the number of replicas. Replica and original isn't the same: replica is a delayed version of original. Answers to your questions:

    1. It's up to number of slave nodes configured 4. It's up to client what node to use master or one of slaves
  • CouchBase cluster: all nodes are equal, no master node. Objects and replicas are distributed by hash function among nodes. If a node fails the rest of the nodes redistribute objects and replicas of the failed node. Answers to your questions: 3. You can configure number of replicas you want to have. 4. There're 2 options:

    • client can connect to any node and node will proxy the request if the object located somewhere else
    • client is aware of objects distribution mechanism and knows structure of the cluster. So client can connect directly to the node which stores required object.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top