A
Andrew
Hello,
I am working on a system that stores items in a CMS. Each item is
indexed by a unique id. The uid can be quite large (255 bytes). We
will be having several million items in the CMS. Items occasionally
get deleted from the CMS. I need to write a program that watches the
CMS to see what new uids appear there. The size of a uid and the sheer
number of them prevent all the uids being held all in memory at the
same time. Does anyone have any suggestion as to how I could detect
new uids please?
One obvious all in memory solution is to maintain a Map of uids. One
reads in the old Map, scans the CMS and for each uid writes an entry
to the Map. This will update any entry already there and create an
entry that needs to be created. Simple. But it just takes up too much
memory.
I am wondering about how efficient it might be to append all the uids
from the current CMS to a file that contains the last collection of
uids. Then sort -u. There will be millions of records. Any thoughts?
Regards,
Andrew Marlow
I am working on a system that stores items in a CMS. Each item is
indexed by a unique id. The uid can be quite large (255 bytes). We
will be having several million items in the CMS. Items occasionally
get deleted from the CMS. I need to write a program that watches the
CMS to see what new uids appear there. The size of a uid and the sheer
number of them prevent all the uids being held all in memory at the
same time. Does anyone have any suggestion as to how I could detect
new uids please?
One obvious all in memory solution is to maintain a Map of uids. One
reads in the old Map, scans the CMS and for each uid writes an entry
to the Map. This will update any entry already there and create an
entry that needs to be created. Simple. But it just takes up too much
memory.
I am wondering about how efficient it might be to append all the uids
from the current CMS to a file that contains the last collection of
uids. Then sort -u. There will be millions of records. Any thoughts?
Regards,
Andrew Marlow