Design Spec
0. Motivation
Current put_file interface only support storing value of format:
Which is value only, if we want to make query of a specific value, full chain scan not avoidable. Thus, we need to introduce KV store in our implementation.
1. put_file
We need to support put_file with data format:
{
tag : "KV",
message :
{
project : "", // for multi-tenancy purposes
key : "", // now we only have one key-column
value: "" // content of the value, in the JSON format
}
}
2. get_file
And we need to add a new interface get_file, with data format:
{
tag : "KV",
message :
{
project : "", // for multi-tenancy purposes
key : "", // wildcard(like xxx*) will be supported
}
}
3. get_range
Range query will be supported with get_range, with data format:
{
tag : "KV",
message :
{
project : "", // for multi-tenancy purposes
keyUp : "", // does not support wildcard
keyLow : "", // does not support wildcard
}
}
Important!!
- This feature only works in BatchTxn mode.
- If there are same keys, the later one will cover the previous one, and get_range will return the latest version instead of duplicate records.
- Currently, there is no transaction management, if the same key is 'put' at the same time, the total order will be utilized to decide which put will be discarded.
- There is no access control, crypto technology can be leveraged to help protecting user data.
- In the future, the transaction fee feature will be included, by which the user of the chain will be charged per Kb data they put in the chain.
- Binary, LOB are not supported.
Design Spec
0. Motivation
Current put_file interface only support storing value of format:
Which is value only, if we want to make query of a specific value, full chain scan not avoidable. Thus, we need to introduce KV store in our implementation.
1. put_file
We need to support put_file with data format:
2. get_file
And we need to add a new interface get_file, with data format:
3. get_range
Range query will be supported with get_range, with data format:
Important!!