You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build failures because the startFabric.sh script specified that the
chaincode required initialization, which is both legacy behavior and is
unnecessary.
The chaincode is updated to use the Contract API instead of the legacy /
low-level chaincode API. The client application is also simplified.
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
Copy file name to clipboardExpand all lines: high-throughput/README.md
+7-17Lines changed: 7 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Hyperledger Fabric, however, careful considerations need to be given to the data
35
35
Let's look at some concrete use cases and how an organization might implement high-throughput storage. These cases will try and explore some of the
36
36
advantages and disadvantages of such a system, and how to overcome them.
37
37
38
-
####Example 1 (IOT): Boxer Construction Analysts
38
+
### Example 1 (IOT): Boxer Construction Analysts
39
39
40
40
Boxer Construction Analysts is an IOT company focused on enabling real-time monitoring of large, expensive assets (machinery) on commercial
41
41
construction projects. They've partnered with the only construction vehicle company in New York, Condor Machines Inc., to provide a reliable,
@@ -59,7 +59,7 @@ eventually be committed to the ledger in the order they were received. Additiona
59
59
by a dashboard to provide live monitoring data. The only difference the engineers have to pay attention to in this case is to make sure the sensors can
60
60
send deltas from the previous reading, rather than fixed readings.
### Example 2 (Balance Transfer): Robinson Credit Co.
63
63
64
64
Robinson Credit Co. provides credit and financial services to large businesses. As such, their accounts are large, complex, and accessed by many
65
65
people at once at any time of the day. They want to switch to blockchain, but are having trouble keeping up with the number of deposits and
@@ -167,29 +167,19 @@ The application will query the variable after submitting the transaction. The re
167
167
168
168
We will now see what happens when you try to run 1000 concurrent updates using a traditional transaction. Run the following command to create a variable named `testvar2`:
169
169
170
-
```
171
-
go run . update testvar2 100 +
172
-
```
173
-
174
-
The variable will have a value of 100:
175
-
176
-
```
177
-
2020/10/27 18:01:45 Value of variable testvar2 : 100
178
-
```
179
-
180
-
Now lets try to update `testvar2` 1000 times in parallel:
181
-
182
170
```
183
171
go run . manyUpdatesTraditional testvar2 100 +
184
172
```
185
173
186
-
When the program ends, you may see that none of the updates succeeded.
174
+
When the program ends, you should see that many of the updates failed and that the value is much lower than expected.
187
175
188
176
```
189
-
2020/10/27 18:03:15 Final value of variable testvar2 : 100
2025/09/12 10:59:31 Value of variable testvar2: 200
190
180
```
191
181
192
-
The transactions failed because multiple transactions in each block updated the same key. Because of these transactions generated read/write conflicts, the transactions included in each block were rejected in the validation stage.
182
+
The transactions failed because multiple transactions in each block updated the same key concurrently. Because of this, these transactions generated read/write conflicts and the transactions included in each block were rejected in the validation stage.
193
183
194
184
You can can examine the peer logs to view the messages generated by the rejected blocks:
0 commit comments