A computer-implemented method comprising: maintaining a key-value store comprising multiple records, wherein each record comprises a respective key and a respective value mapped to the respective key, wherein each value is restricted to a maximum size limit in terms of quantity of data; wherein the key-value store comprises A) a first record structure in which each key comprises a different index and each value comprises a respective set of item IDs, and B) a second record structure in which each key comprises a different one of the item IDs and each value comprises a respective item of data; wherein said maintaining comprises adding each of a plurality of new item IDs to a group in the first record structure; wherein the new item IDs are added to a tree structure formed from records of the first record structure, comprising a root record at a root level and a plural number of records at each of one or more successive levels; and wherein each new item ID of the group is added in turn by, starting at the root level with the root record as a current record: I) determining whether the value of the current record will exceed the maximum size limit if the new item ID is included therein, and if not, including the new item ID in the value of the current record, but II) if so, identifying a number of records at the next successive level of the tree structure above the level of the current record, and applying a deterministic transformation to the item ID of the new item to determine one of the identified number of records, and repeating from I) with said determined one of the records now as the current record, wherein said transformation comprises hashing the item ID into an unsigned integer, and taking the unsigned integer modulo the number of records at the next level, such that said transformation has a uniform output distribution; wherein over the group, at least one or some of the respective item IDs are added at at least a first level above the root level via at least a first instance of II). maintaining a key-value store comprising multiple records, wherein each record comprises a respective key and a respective value mapped to the respective key, wherein each value is restricted to a maximum size limit in terms of quantity of data; wherein the key-value store comprises A) a first record structure in which each key comprises a different index and each value comprises a respective set of item IDs, and B) a second record structure in which each key comprises a different one of the item IDs and each value comprises a respective item of data; wherein said maintaining comprises adding each of a plurality of new item IDs to a group in the first record structure; wherein the new item IDs are added to a tree structure formed from records of the first record structure, comprising a root record at a root level and a plural number of records at each of one or more successive levels; and wherein each new item ID of the group is added in turn by, starting at the root level with the root record as a current record: I) determining whether the value of the current record will exceed the maximum size limit if the new item ID is included therein, and if not, including the new item ID in the value of the current record, but II) if so, identifying a number of records at the next successive level of the tree structure above the level of the current record, and applying a deterministic transformation to the item ID of the new item to determine one of the identified number of records, and repeating from I) with said determined one of the records now as the current record, wherein said transformation comprises hashing the item ID into an unsigned integer, and taking the unsigned integer modulo the number of records at the next level, such that said transformation has a uniform output distribution; I) determining whether the value of the current record will exceed the maximum size limit if the new item ID is included therein, and if not, including the new item ID in the value of the current record, but II) if so, identifying a number of records at the next successive level of the tree structure above the level of the current record, and applying a deterministic transformation to the item ID of the new item to determine one of the identified number of records, and repeating from I) with said determined one of the records now as the current record, wherein said transformation comprises hashing the item ID into an unsigned integer, and taking the unsigned integer modulo the number of records at the next level, such that said transformation has a uniform output distribution; wherein over the group, at least one or some of the respective item IDs are added at at least a first level above the root level via at least a first instance of II).