Why binary data
Binary data can be used to store any information that is either too large or does not fall into a the typical database usage
Documents (PDF, word, excel), Code snippets, Pictures
Sending and receiving Binary data……To be updated
A separate API is used to read and write binary data.
Internal storage……To be updated
In the cache database the binary filed is represented by a text field that will store the Identifier of the encrypted binary data. The actual binary data is stored in off chain storage.
Query……To be updated
When a record is queried only the binary files identifier is returned.
If it is necessary to get the binary data a second API call must be done to request it.
Env Process Flow
Both the writing and reading of the files are a 2 step process, this was done to allow:
-
A streaming API for the files, which can get large
-
A separation between the data and the files to not bloat the data env traffic with unnecessary file data
Writing a file and referencing the file
-
File is sent to Binary API (/binary/write)
-
File is encrypted
-
File is hashed
-
File is sent to Off Chain Storage
-
Identifier is returned
-
<orgID>;<encType>;<enc1>;<enc2>;<encN>;<fileHash>
-
-
-
Data Envelope binary field us updated with returned file Identifier
-
The data envelope is processed as a normal envelope would be
-
Reading a file
-
A data envelope with a Binary identifier is read
-
File is requested from the Binary API (/binary/read)
-
The entire identifier is submitted
-
<orgID>;<encType>;<enc1>;<enc2>;<encN>;<fileHash>
-
-
The file is read from off chain storage
-
File is decrypted & File is returned
-