diff --git a/README.md b/README.md index f43aed4..bdb4e3d 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. diff --git a/src/main/java/middlelayer/MiddleLayer.java b/src/main/java/middlelayer/MiddleLayer.java index 13a191e..d86f4b4 100644 --- a/src/main/java/middlelayer/MiddleLayer.java +++ b/src/main/java/middlelayer/MiddleLayer.java @@ -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. diff --git a/src/main/java/model/skipgraph/SkipGraph.java b/src/main/java/model/skipgraph/SkipGraph.java index 8512713..1dd846e 100644 --- a/src/main/java/model/skipgraph/SkipGraph.java +++ b/src/main/java/model/skipgraph/SkipGraph.java @@ -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; diff --git a/src/main/java/skipnode/SkipNode.java b/src/main/java/skipnode/SkipNode.java index 2e72797..b340f8e 100644 --- a/src/main/java/skipnode/SkipNode.java +++ b/src/main/java/skipnode/SkipNode.java @@ -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. diff --git a/src/main/java/underlay/packets/requests/NameIdLevelSearchRequest.java b/src/main/java/underlay/packets/requests/MembershipVectorLevelSearchRequest.java similarity index 75% rename from src/main/java/underlay/packets/requests/NameIdLevelSearchRequest.java rename to src/main/java/underlay/packets/requests/MembershipVectorLevelSearchRequest.java index 2d336bb..3a8d4ea 100644 --- a/src/main/java/underlay/packets/requests/NameIdLevelSearchRequest.java +++ b/src/main/java/underlay/packets/requests/MembershipVectorLevelSearchRequest.java @@ -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; @@ -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; diff --git a/src/test/java/unittest/LocalSkipGraph.java b/src/test/java/unittest/LocalSkipGraph.java index 63ea416..47eacff 100644 --- a/src/test/java/unittest/LocalSkipGraph.java +++ b/src/test/java/unittest/LocalSkipGraph.java @@ -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);