Unsolved
This post is more than 5 years old
5 Practitioner
•
274.2K Posts
0
3105
Multi TAG CLIP writing sample
Hi All,
does anybody have a sample code showing how to write multiple files in a CLIP.
I'm changing my C++ code on a DLL I wrote 5 years ago for a customer using Visual Basic 6.0.
Now they want to use multi-tag clips in order to increase writing performance.
I wrote a sample (see ScriviGruppo function on attached MYDLL2) but I would like know if there is any algorithm showing how to improve performance when writing a lot of small files in a single CLIP.
Thanks.
Carlo.
gstuartemc
417 Posts
1
March 7th, 2009 07:00
There seems to be more than one question so I will take them one at a time.
The Centera SDk comes with a StoreContent sample in C and Java. This shows how to create a tag and store content as a blob. Simply repeating the relevant code fragment will show you how to do this multiple times i.e. CreateTag, Create[File | Buffer]ForInput, BlobWrite, CloseStream, CloseTag.
The best way of storing multiple small files within a single clip is to make use of Embedded Blobs (fully descibed in the SDK documentation). Setting the Threshold to the maximum normally allowed value (100K) will result in files smaller than this not being written sepeartely to the cluster as they will be held locally by the SDK and only transmitted together during the ClipWrite. This also cuts down on Object Count usage on the cluster at the cost of loss of single instancing of these small files (as they are stored as base64 encoded attributes within the CDF rather than distinct separate blob objects).
Anonymous
5 Practitioner
5 Practitioner
•
274.2K Posts
0
March 8th, 2009 06:00
Thanks for your help.
This means I'm already using the best algorithm.
Unfortunately I can't use the Embedded Blobs functionality since my file are each 150K on size.
Bye.
Carlo.
gstuartemc
417 Posts
1
March 9th, 2009 04:00
Hi Carlo - note that I said the "maximum normally allowed value". It is possible to adjust the maximum value of the Embedded Threshold up to 1MB if you particularly wanted to make use of them.
Let me know if that would be of interest - as your files are 150K it may be worthwhile for you.