Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

Storage API

Marshall T. Rose edited this page Sep 28, 2019 · 1 revision

Synchronization records for a paricular category are collected in a bucket identified as /{userId}/{categoryId}/.

Accordingly, an S3 LIST of the bucket with the ?start-after={timestamp}&max-items=(count} will return at most count items that were added to the bucket after the indicated timestamp.

The S3 KEY space, though limited to 1024 UTF-8 characters, is used to represent a serialized payload of one or more SyncRecords. This is accomplished by chunking a payload into multiple S3 KEYs, as needed.

Accordingly, the S3 KEY format is:

/{version}                        //    1 octet
  /{userId}                       //   32 octers
    /{categoryId}                 //    1 octet
      /{timestamp}                //   16 octets
        /{CRC32(payload)}         //    4 octets
          /{partNo}               //    1 octet
            /{payload.partNo}     // ~896 octets: 1024 minus 7 delimiters, 56 fixed octets, ~65 fuzzy octets
Clone this wiki locally