Skip to content

Commit

Permalink
renames name id and num id to new equivalents.
Browse files Browse the repository at this point in the history
  • Loading branch information
yhassanzadeh13 committed Sep 4, 2023
1 parent 67fa57b commit e07c642
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ parameters are:
* The Underlay Protocol to be used.
* Port
* Introducer Address
* Name ID Assignment Protocol
* Name ID value if Assignment Protocol is self-assgined
* Membership Vector Assignment Protocol
* Membership Vector value if Assignment Protocol is self-assgined
* Numerical ID Assignment Protocol
* Numerical ID value if Assignment Protocol is self-assigned
* Storage Path
Expand All @@ -29,11 +29,11 @@ numerical ID to conduct the search. Then, the query is executed from the designa
node as the source of the query, and finally, it prints to the user the information of
the node returned as the result of the query.

## Search by Name ID
## Search by Membership Vector (aka Search by Name ID)

After the user picks this option, the interactor API prompts the user to privde the target
name ID to conduct the search, which can be either a binary string, or a hexadecimal number
denoting the bytes of the name ID. Then, the query is executed from th desginated skip node
membership vector to conduct the search, which can be either a binary string, or a hexadecimal number
denoting the bytes of the membership vector. Then, the query is executed from th desginated skip node
as the source of the query, and finally, it prints to the user the information of the node
returned as the result of the query.

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/middlelayer/MiddleLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public SearchResult searchByMembershipVector(String destinationAddress, int port
}

/**
* Method for searching by the name id.
* Method for searching by the membership vector.
*
* @param destinationAddress String representing the destination address.
* @param port Integer representing the port.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/model/skipgraph/SkipGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
public class SkipGraph {
/**
* Size of name ID and numerical ID in bits.
* Size of identifier and membership vector in bits.
* It is set to 32 bytes which corresponds to 256 bits.
*/
public static final int IDENTIFIER_SIZE = 32;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/skipnode/SkipNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public boolean isAvailable() {

/**
* Finds the `ladder`, i.e. the node that should be used to propagate a newly joined node to the
* upper layer. Only used by the insertion protocol, and not by the name ID search protocol even
* upper layer. Only used by the insertion protocol, and not by the membership vector search protocol even
* though both of them makes use of ladders.
*
* @return the `ladder` node information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import underlay.packets.RequestType;

/**
* Request for name id level search.
* Request for membership vector level search.
*/
public class NameIdLevelSearchRequest extends Request {
public class MembershipVectorLevelSearchRequest extends Request {

public final int level;
public final int direction;
Expand All @@ -20,7 +20,7 @@ public class NameIdLevelSearchRequest extends Request {
* @param direction Integer representing the direction.
* @param target membership vector of the target node.
*/
public NameIdLevelSearchRequest(int level, int direction, MembershipVector target) {
public MembershipVectorLevelSearchRequest(int level, int direction, MembershipVector target) {
super(RequestType.MembershipVectorLevelSearch);
this.level = level;
this.direction = direction;
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/unittest/LocalSkipGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public LocalSkipGraph(int size, boolean manualJoin) {
SkipNodeIdentity id2 = identities.get(j);
LookupTable lt2 = lookupTables.get(j);
// Connect the nodes at this level if they should be connected
// according to their name ID.
// according to their membership vector.
if (id1.getMemVec().commonPrefix(id2.getMemVec()) >= l) {
lt1.updateRight(id2, l);
lt2.updateLeft(id1, l);
Expand Down

0 comments on commit e07c642

Please sign in to comment.