update bitswap readme
Jeromy committed
Dec 4, 2014 at 21:38 UTC
afa28dc67234dcad6e5328219023273e8292d51f
1 file changed
+12
-8
exchange/bitswap/README.md
+12
-8
@@ -1,22 +1,24 @@
1
-#Welcome to Bitswap
1
+#Welcome to Bitswap (The data trading engine)
2
3
-Bitswap is the module that is responsible for requesting blocks over the
4
-network from other ipfs peers.
3
+Bitswap is the module that is responsible for requesting and providing data
4
+blocks over the network to and from other ipfs peers. The role of bitswap is
5
+to be a merchant in the large global marketplace of data.
6
7
##Main Operations
7
-Bitswap has three main operations:
8
+Bitswap has three high level operations:
9
10
###GetBlocks
11
`GetBlocks` is a bitswap method used to request multiple blocks that are likely
11
-to all be provided by the same peer (part of a single file, for example).
12
+to all be provided by the same set of peers (part of a single file, for example).
13
14
###GetBlock
15
`GetBlock` is a special case of `GetBlocks` that just requests a single block.
16
17
###HasBlock
18
`HasBlock` registers a local block with bitswap. Bitswap will then send that
18
-block to any connected peers who want it (strategy allowing), and announce to
19
-the DHT that the block is being provided.
19
+block to any connected peers who want it (with the strategies approval), record
20
+that transaction in the ledger and announce to the DHT that the block is being
21
+provided.
22
23
##Internal Details
24
All `GetBlock` requests are relayed into a single for-select loop via channels.
@@ -39,4 +41,6 @@ If another peers wantlist is received, Bitswap will call its strategies
41
be sent the block they are requesting (if we even have it).
42
43
##Outstanding TODOs:
42
-- Ensure only one request active per key
44
+[] Ensure only one request active per key
45
+[] More involved strategies
46
+[] Ensure only wanted blocks are counted in ledgers