Prototype sample REST server to demonstrate good Fabric Node SDK practices for parts of FAB-18511
The intention is to deliver the sample to the asset-transfer-basic/rest-api-typescript directory of the fabric-samples repository
See the sample readme for usage intructions
The primary aim of this sample is to show how to write a long running client application using the Fabric Node SDK, i.e. without reconnecting for each transaction
It should also show:
- basic transaction retries
- long running event handling
- requests from multiple users
Should transactions be retried unless they fail with specific errors, e.g. duplicate transaction (the current implementation)?
or
Should transactions be retried when they fail with specific errors?
Also, transactions are currently only retried if they are successfully endorsed- does that seem reasonable?
If the transaction failed because of MVCC_READ_CONFLICT, is a chance that it could pass when retrying? (Is MVCC_READ_CONFLICT an endorsement error?)
Need to make sure it's clear what went wrong and fail properly it necessary, for example when starting without a redis instance
Coverage is looking much better now but there are a few more todos
Need to document what's going on and why, especially in the fabric.ts file!
- More people trying out the sample (and ideally trying to break it a bit!)
- Code review to merge sample into fabric-samples
See issues