BLOB and CLOB
In the database table, the BLOB type supports the binary data fetch or insert operations. The CLOB type supports variable-length large character object fetch or insert operations.
The BLOB/CLOB are supported by the engine message content and its cache file.
When the Cloverleaf database protocol processes the BLOB/CLOB objects, the engine caches the BLOB/CLOB data to the local file. It then saves that file path in the engine message to improve the message flow performance
The message's BLOB/CLOB field is built by:
- The Cloverleaf CLOB or BLOB digest as the message content prefix.
- The full path of the cache file.
- (Optional) The timestamp for the GUID identifier attached to the digest.
The Cloverleaf BLOB digest is:
924C674350DE16494C901601E1504E96627757E61684CDF28B9A3E2847DE687A
The Cloverleaf CLOB digest is:
3A45E466D51049A11BCC3E52AD22216DE2E9046C4E98EA7545B60B8617487DE2
For CLOB inserting, the matched VRL field must start with the Cloverleaf CLOB digest with a full file path. The file content is text-based and should be UTF-8 encoded. For BLOB inserting, the matched VRL field must start with the Cloverleaf BLOB digest with a full file path. Usually, this is a binary file. The attached file is then loaded and inserted into the table's CLOB/BLOB column at engine runtime.
For example, an edited raw message is similar to:
1,3A45E466D51049A11BCC3E52AD22216DE2E9046C4E98EA7545B60B8617487DE2/opt/cis20.1/integrator/helloworld/LOBs/msgbig.txt,
924C674350DE16494C901601E1504E96627757E61684CDF28B9A3E2847DE687A/opt/cis20.1/integrator/helloworld/LOBs/releasenotes.pdf
msgbig.txt is inserted into the database table's CLOB column.
releasenotes.pdf is inserted into the database table's BLOB column.
The table schema is required in the Inbound database protocol when inserting/updating the CLOB/BLOB message into the database using the Read Success/Failure action.
-r
” option is used. For CLOB fetching, the column's content is saved into a temporary file located within $HCISITEDIR/exec/processes/processName/dbpcache folder. The temporary file name ends with “.clb”.
The BLOB is the same as CLOB, but ends with “.blb”.
Both file names are combined with these part:
- A constant beginning with "dbpcache".
- An intermediate with sha256sum of the file itself. The timestamp at the end of sha256sum is optional.
- The postfix is last.
For example, a qualified BLOB field in the message resembles:
924C674350DE16494C901601E1504E96627757E61684CDF28B9A3E2847DE687A/opt/cis20.1/integrator/helloworld/exec/
processes/helloworld/dbpcache/dbpcache38ec80f0caa60bb6d0a2c2ac1e39f45ea361e1e4d4208d79fae50f39c31a4edc.blb