Commits

Adam Lindsay committed 13fa662

Updated readme for new CLI options and utilities.

Comments (0)

Files changed (2)

 
 === Basic usage ===
 
-  python location.py [[peer_node] port_num]
+  python location.py [-h peer_node] [-p port_num] [--help]
 
 Initiates and/or joins a simple peer-to-peer network. Default port_num
 is 9900. Absent a peer_node (which is the peer initially contacted for
 
 The basic server uses consistent hashing via hash_ring.py, developed by
 Amir Salihefendic. For better and for worse, I modified the code to
-allow for easier node set manipulations and different node resolution
-behavior so that it's more trivially related to md5 hashes.
+allow for easier node set manipulations (as if it were a list) and 
+different node resolution behavior so that the internal keys are more 
+directly related to md5 hashes.
 
 The library requires the Apache Thrift Python libraries to be installed,
-but does not currently technically require the Thrift compiler or any
-other language libraries.
+but - because the thrift compiler has been run already - does not currently 
+require the Thrift compiler or any other language libraries.
 
 === Design priorities ===
 
 real. 
 
 Although diststore.thrift uses locator.thrift for a lot of its interfaces,
-the implementation overloads many of the base methods. Let's hope it ends
-up an informative example for either one of us. 
+the implementation overloads some of the base methods as an illustration 
+of how this simple library might be used in other projects.
 
 Example usage, run this in a couple terminal windows:
   python storeserver.py
   python storeput.py b banana
   python storeput.py c crayon
   python storeput.py d dinosaur
+  python storeprimer.py
 
 You can then query the store:
-  python storeget.py c
+  python storeget.py  c
+  python storetest.py
   
 or start a new server, and see how a minimum of the existing keys 
 redistribute themselves:
 
 include "locator.thrift"
 
-struct StarterPackage {
- 1: list<locator.Location> nodes,
- 2: map<string, string>    store,
-}
-
 service Store extends locator.Locator {
  string                 get     (1:string key)
  oneway void            put     (1:string key, 2:string value)
-# StarterPackage         join    (1:locator.Location location)
-# map<string, string>    add     (1:locator.Location location, 2:list<locator.Location> authorities)
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.