DynamoDB based konserve backend.
DynamoDB based konserve backend.
(batch-delete-items! client table-name store-keys)Delete store-keys with BatchWriteItem DeleteRequests: non-atomic, at most 25
keys per request, idempotent (deleting a missing item succeeds). Unprocessed
items are retried with bounded backoff; keys still unprocessed afterwards are
reported in :failed. Returns {:deleted #{...} :failed {key diagnostic}}
covering every distinct requested key exactly once.
A request that throws (transport, or throttling the SDK's own retries did not
overcome) has an unknown outcome. Before any key is confirmed the error is
rethrown. After that, the confirmed keys are not discarded: the keys of the
failed request and of every chunk not yet sent are reported in :failed with
the error, and no further request is sent.
Delete `store-keys` with BatchWriteItem DeleteRequests: non-atomic, at most 25
keys per request, idempotent (deleting a missing item succeeds). Unprocessed
items are retried with bounded backoff; keys still unprocessed afterwards are
reported in `:failed`. Returns {:deleted #{...} :failed {key diagnostic}}
covering every distinct requested key exactly once.
A request that throws (transport, or throttling the SDK's own retries did not
overcome) has an unknown outcome. Before any key is confirmed the error is
rethrown. After that, the confirmed keys are not discarded: the keys of the
failed request and of every chunk not yet sent are reported in `:failed` with
the error, and no further request is sent.BatchWriteItem accepts at most 25 write requests per call.
BatchWriteItem accepts at most 25 write requests per call.
Retries of UnprocessedItems per BatchWriteItem chunk before giving up.
Retries of UnprocessedItems per BatchWriteItem chunk before giving up.
(batch-get-items client table-name store-keys consistent-read?)(batch-get-items client table-name store-keys consistent-read? keys-only?)Fetch up to 100 distinct keys, retrying partial responses with bounded backoff.
Returns an aggregated BatchGetItemResponse. Exhaustion throws rather than
presenting unprocessed keys as missing. With keys-only? only the "Key"
attribute is returned (an existence check does not need the values).
Fetch up to 100 distinct keys, retrying partial responses with bounded backoff. Returns an aggregated BatchGetItemResponse. Exhaustion throws rather than presenting unprocessed keys as missing. With `keys-only?` only the "Key" attribute is returned (an existence check does not need the values).
(batch-write-fragments! client table items)Stage at most 25 immutable 300 KiB fragments. Even with base64 and envelope overhead this stays below BatchWriteItem's 16 MiB wire limit. Retry only UnprocessedItems; callers must not publish manifests until this succeeds.
Stage at most 25 immutable 300 KiB fragments. Even with base64 and envelope overhead this stays below BatchWriteItem's 16 MiB wire limit. Retry only UnprocessedItems; callers must not publish manifests until this succeeds.
(create-dynamodb-table client table-name {:keys [read-capacity write-capacity]})(dynamodb-client opts)Creates a new DynamoDB client using the provided options, with explicit credential handling.
Creates a new DynamoDB client using the provided options, with explicit credential handling.
(put-item-conditional client table-name item expected-meta)PutItem only if the stored Meta attribute is still expected-meta — or, when
that is ::absent, only if the item does not exist. True on success, false
when DynamoDB refuses.
DynamoDB evaluates the condition itself, atomically with the write, which is
what makes this backing's guarantee :global: it holds against every writer
anywhere, not merely those sharing a filesystem or a heap.
The condition compares the META attribute rather than a separate version column. konserve's revision lives inside the serialized metadata, so the meta bytes ARE the revision as far as this item is concerned — and comparing them needs no schema change, no second attribute to keep in step, and no migration for existing tables. Meta is small; the value is not compared and not sent.
Expression attribute NAMES for both Key and Meta: KEY is a DynamoDB
reserved word, and a literal in an expression would be rejected.
PutItem only if the stored `Meta` attribute is still `expected-meta` — or, when that is `::absent`, only if the item does not exist. True on success, false when DynamoDB refuses. DynamoDB evaluates the condition itself, atomically with the write, which is what makes this backing's guarantee `:global`: it holds against every writer anywhere, not merely those sharing a filesystem or a heap. The condition compares the META attribute rather than a separate version column. konserve's revision lives inside the serialized metadata, so the meta bytes ARE the revision as far as this item is concerned — and comparing them needs no schema change, no second attribute to keep in step, and no migration for existing tables. Meta is small; the value is not compared and not sent. Expression attribute NAMES for both `Key` and `Meta`: `KEY` is a DynamoDB reserved word, and a literal in an expression would be rejected.
(release store env)Release the store connection.
Release the store connection.
(scan-key-page client table-name cursor limit consistent-read?)One bounded page of the table's physical keys. Scan with limit items read
(DynamoDB also stops a page at 1 MB read), projecting only the key attribute.
cursor is nil to start, else the last key of the previous page (the table's
only key attribute is the hash key Key). Fragment items are internal to this
layout and left out, as -keys leaves them out; so a page can be empty and
still have a next cursor. Returns {:keys [...] :cursor next-or-nil}.
One bounded page of the table's physical keys. Scan with `limit` items read
(DynamoDB also stops a page at 1 MB read), projecting only the key attribute.
`cursor` is nil to start, else the last key of the previous page (the table's
only key attribute is the hash key `Key`). Fragment items are internal to this
layout and left out, as `-keys` leaves them out; so a page can be empty and
still have a next cursor. Returns {:keys [...] :cursor next-or-nil}.(scan-table client table-name)(scan-table client table-name start-key)(scan-table client table-name start-key consistent-read?)(transact-write-items client transact-items)Execute multiple write operations in a single, atomic transaction. Limited to 100 items per transaction by DynamoDB.
Execute multiple write operations in a single, atomic transaction. Limited to 100 items per transaction by DynamoDB.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |