Skip to content

Commit

Permalink
chore: move cache 'Integrations' section up out of 'Develop'
Browse files Browse the repository at this point in the history
On the Topics page, we have `Integrations` as a top level nav
item. But for some reason on the Cache page it was nested inside
`Develop`.

This commit moves /cache/develop/integrations up to just /cache/integrations
and updates the side nav accordingly, to make it consistent
with Topics.
  • Loading branch information
cprice404 committed Jun 18, 2024
1 parent aab3743 commit 1d9f270
Show file tree
Hide file tree
Showing 103 changed files with 170 additions and 169 deletions.
2 changes: 1 addition & 1 deletion docs/cache/develop/api-reference/collection-ttl.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CollectionTtl parameter allows you to specify this behavior.

The default behavior is that the collection TTL is reset whenever a write operation occurs. You cannot provide a CollectionTTL object when performing a read operation like `dictionaryFetch` or `listLength`.

See [Expire Data with TTL](./../../learn/how-it-works/expire-data-with-ttl.md) for more information on how TTL works with Momento Cache.
See [Expire Data with TTL](../../learn/how-it-works/expire-data-with-ttl.md) for more information on how TTL works with Momento Cache.

:::caution

Expand Down
2 changes: 1 addition & 1 deletion docs/cache/develop/api-reference/dictionary-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { SdkExampleTabs } from "@site/src/components/SdkExampleTabs";
import { SdkExampleTabsImpl } from "@site/src/components/SdkExampleTabsImpl";

# Dictionary API reference for Momento Cache
This page details the Momento API methods for the [dictionary collection data type](./../basics/datatypes.md#dictionary-collections).
This page details the Momento API methods for the [dictionary collection data type](../basics/datatypes.md#dictionaries).

:::info

Expand Down
4 changes: 2 additions & 2 deletions docs/cache/develop/api-reference/http-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Discover the HTTP API for edge computing services to access serverl

# HTTP API Reference for Momento Cache

Momento provides an HTTP API interface for your applications that can’t use our [SDKs](./../) or for ones that prefer to use things like curl or fetch. For example, when deploying to edge compute services like [Cloudflare Workers](https://workers.cloudflare.com/), [Fastly Compute@Edge](https://www.fastly.com/products/edge-compute), etm. this API is for you. Be aware that most other applications should likely use [Momento’s SDK clients](./../).
Momento provides an HTTP API interface for your applications that can’t use our [SDKs](../) or for ones that prefer to use things like curl or fetch. For example, when deploying to edge compute services like [Cloudflare Workers](https://workers.cloudflare.com/), [Fastly Compute@Edge](https://www.fastly.com/products/edge-compute), etm. this API is for you. Be aware that most other applications should likely use [Momento’s SDK clients](../).

You can also view the Open API Specification in our [public workspace in Postman](https://www.postman.com/gomomento/workspace/momento-http-api/api/662743a0-471a-41a1-b446-5db596164a00/definition/4765b18e-ba84-4802-9795-ecce9c408062?view=documentation).

Expand Down Expand Up @@ -130,7 +130,7 @@ Sets a scalar value in a cache.
| key | no** | URL-safe string | The key to retrieve from the cache. |
| key_base64 | no** | Base64 URL-encoded binary key | The key to retrieve from the cache. |
| token | no*** | URL-safe string | The Momento auth token, in string format, to be used for authentication/authorization of the request. |
| ttl_seconds | yes | Integer | The TTL to be set on the key, in seconds. For more on TTL, see [Expire Data with Time-to-Live](./../../learn/how-it-works/expire-data-with-ttl). |
| ttl_seconds | yes | Integer | The TTL to be set on the key, in seconds. For more on TTL, see [Expire Data with Time-to-Live](../../learn/how-it-works/expire-data-with-ttl). |

** You must specify a key to be accessed in the cache. This may be either the key query parameter, which allows a URL-safe string, or the key_base64 parameter, which allows a Base64 URL-encoded key.

Expand Down
2 changes: 1 addition & 1 deletion docs/cache/develop/api-reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ Collections may contain different types of structures depending on your use case
* [Sets](./set-collections.md) are an unordered collection of unique elements in string format.
* [Sorted Sets](./sorted-set-collections.md) are an ordered collection of unique elements. Each element contains a value:score pair.

For more in-depth information on usage, see [collection data types](./../basics/datatypes.md).
For more in-depth information on usage, see [collection data types](../basics/datatypes.md).

## Current status of API support in SDKs

Expand Down
2 changes: 1 addition & 1 deletion docs/cache/develop/api-reference/list-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { SdkExampleTabsImpl } from "@site/src/components/SdkExampleTabsImpl";

# List API reference for Momento Cache

This page details the Momento API methods for the [list collection data types](./../basics/datatypes.md#list-collections).
This page details the Momento API methods for the [list collection data types](../basics/datatypes.md#lists).

:::info

Expand Down
2 changes: 1 addition & 1 deletion docs/cache/develop/api-reference/set-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Momento collection types use a [CollectionTTL](./collection-ttl.md) to specify t

Example: if your set contains `[1, 2, 3]` and you add 2, the set remains `[1, 2, 3].`

See [Sets](./../basics/datatypes.md#set-collections) for more information on their usage.
See [Sets](../basics/datatypes.md#sets) for more information on their usage.

## Set methods

Expand Down
2 changes: 1 addition & 1 deletion docs/cache/develop/authentication/api-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ When creating an API key, you are presented with two options via the [Momento co

:::info

It is not possible to create "super-user" API keys via the Momento SDK; these may only be created in the console. However, you *can* use the SDK to create API keys with specific permissions, via fine-grain access control! Check out our [Auth API reference page](./../api-reference/auth.md) for more details.
It is not possible to create "super-user" API keys via the Momento SDK; these may only be created in the console. However, you *can* use the SDK to create API keys with specific permissions, via fine-grain access control! Check out our [Auth API reference page](../api-reference/auth.md) for more details.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/cache/develop/authentication/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Below are some examples to create tokens with different sets of permissions:

<SdkExampleTabs snippetId={'API_GenerateDisposableToken'} />

For detailed information on creating a token, please refer to the [API reference page](./../api-reference/auth.md).
For detailed information on creating a token, please refer to the [API reference page](../api-reference/auth.md).

## Expiration

Expand Down
8 changes: 4 additions & 4 deletions docs/cache/develop/basics/datatypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ A list is a collection of ordered elements, sorted in the sequence each element
]
```

To learn the API methods, check the [API reference for list collection data types](./../api-reference/list-collections.md).
To learn the API methods, check the [API reference for list collection data types](../api-reference/list-collections.md).

#### Dictionaries

Expand All @@ -56,7 +56,7 @@ An example of using a dictionary is when you need to store data together and ret
}
```

To learn the API methods, check the [API reference for dictionary collection data types](./../api-reference/dictionary-collections.md).
To learn the API methods, check the [API reference for dictionary collection data types](../api-reference/dictionary-collections.md).

#### Sets
A set is an unordered collection of unique elements, each in string format. For example, no matter how many times you add 'sugar' to a set, there will only be one entry for 'sugar'.
Expand All @@ -72,7 +72,7 @@ A set is an unordered collection of unique elements, each in string format. For
}
```

To learn the API methods, check the [API reference for set collection data types](./../api-reference/set-collections.md).
To learn the API methods, check the [API reference for set collection data types](../api-reference/set-collections.md).

#### Sorted sets

Expand All @@ -97,7 +97,7 @@ If elements have the same score, they are sorted [lexicographically](https://www
:::
To learn the API methods, check the [API reference for sorted set collection data types](./../api-reference/sorted-set-collections.md).
To learn the API methods, check the [API reference for sorted set collection data types](../api-reference/sorted-set-collections.md).
## FAQs
<details>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ The general pattern of behavior you can expect from Momento SDKs when it comes t

<img src="/img/sdk_retry_behavior.png" width="100%" alt="logic diagram depicting SDK retry behavior"/>

Momento SDKs do not retry throttled requests ([limits exceeded](./../../limits/)). For other errors, the SDK will not retry if the operation requested is not [idempotent](https://en.wikipedia.org/wiki/Idempotence). For example, if you are incrementing a counter and receive an error response, the SDK will not retry on your behalf (because this could result in over-counting). In the case of non-idempotent operations, it is safer to let the developer choose whether to retry.
Momento SDKs do not retry throttled requests ([limits exceeded](../../limits/)). For other errors, the SDK will not retry if the operation requested is not [idempotent](https://en.wikipedia.org/wiki/Idempotence). For example, if you are incrementing a counter and receive an error response, the SDK will not retry on your behalf (because this could result in over-counting). In the case of non-idempotent operations, it is safer to let the developer choose whether to retry.
2 changes: 1 addition & 1 deletion docs/cache/develop/guides/working-with-files-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';

# Add and retrieve a file with Momento Cache

An item in Momento Cache is a byte array, so a cache can easily store most any file you want to create, as long as it is under the [per item limit of 1MB](./../../limits).
An item in Momento Cache is a byte array, so a cache can easily store most any file you want to create, as long as it is under the [per item limit of 1MB](../../limits).

Here is an example of reading a file from the filesystem, saving the file to an item in a cache, reading it from the cache, and then writing it to the filesystem.
<Tabs>
Expand Down
8 changes: 4 additions & 4 deletions docs/cache/develop/guides/working-with-time-series-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ description: Learn how to store time series data in Momento Cache

Temporarily storing time series data enables you to visualize that data without having to worry about long-term storage costs. Let's think about a common use case for time series data like IoT sensors. Sure, it's useful to see what the recent data looks like, but do you need to keep each sensor value indefinitely? With numerous sensors sending metrics into your database, your storage costs will skyrocket. Storing that data in Momento instead is a great way to take advantage of what Momento does best - storing large volumes of data without having to worry about scaling or long-term storage costs.

You can store related data elements in Momento's collection data types such as [lists](./../api-reference/list-collections.md), [sets](./../api-reference/set-collections.md), and [dictionaries](./../api-reference/dictionary-collections.md). You should pick the appropriate data type for your application's access patterns and data schema. For time series data, you should use Momento's [SortedSet data type](./../api-reference/sorted-set-collections.md). You can read more about `SortedSets` [in this blog](https://www.gomomento.com/blog/were-back-with-another-collection-data-type-sorted-sets).
You can store related data elements in Momento's collection data types such as [lists](../api-reference/list-collections.md), [sets](../api-reference/set-collections.md), and [dictionaries](../api-reference/dictionary-collections.md). You should pick the appropriate data type for your application's access patterns and data schema. For time series data, you should use Momento's [SortedSet data type](../api-reference/sorted-set-collections.md). You can read more about `SortedSets` [in this blog](https://www.gomomento.com/blog/were-back-with-another-collection-data-type-sorted-sets).

### Why use SortedSets?

- Sorting your time series data by timestamp makes it easy for client applications to retrieve and display the data in sorted order.
- Limit query responses with the Momento SDK's [SortedSetFetchByRank](./../api-reference/sorted-set-collections.md#sortedsetfetchbyrank) and [SortedSetFetchByScore](./../api-reference/sorted-set-collections.md#sortedsetfetchbyscore) to a certain number of values or values within a certain timespan.
- Limit query responses with the Momento SDK's [SortedSetFetchByRank](../api-reference/sorted-set-collections.md#sortedsetfetchbyrank) and [SortedSetFetchByScore](../api-reference/sorted-set-collections.md#sortedsetfetchbyscore) to a certain number of values or values within a certain timespan.

## Storing time series data in the SortedSet
Use the Momento SDK's [SortedSetPutElement](./../api-reference/sorted-set-collections.md#sortedsetputelement) method to insert items into your SortedSet.
Use the Momento SDK's [SortedSetPutElement](../api-reference/sorted-set-collections.md#sortedsetputelement) method to insert items into your SortedSet.

Let's consider a workload for storing IoT sensor data in a Momento Cache.

Expand Down Expand Up @@ -52,7 +52,7 @@ If you only want to retrieve a subset of the SortedSet, you could set the startR
const sensor_data = await cacheClient.sortedSetFetchByRank("sensor_data", `${sensor_id}-sensor-data`, 0, 10)
```

If you only want to retrieve data from a specified time period instead of a specific number of values, you can use [SortedSetFetchByScore](./../api-reference/sorted-set-collections.md#sortedsetfetchbyscore).
If you only want to retrieve data from a specified time period instead of a specific number of values, you can use [SortedSetFetchByScore](../api-reference/sorted-set-collections.md#sortedsetfetchbyscore).

>Code snippet for SortedSetFetchByScore to retrieve a subset of the SortedSet
Expand Down
4 changes: 2 additions & 2 deletions docs/cache/develop/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 6
sidebar_label: Develop
title: Developing applications with Momento SDKs
description: Learn the core concepts for getting started with the Momento SDKs.
Expand Down Expand Up @@ -32,7 +32,7 @@ If you're storing your Momento auth token in a secret manager such as [AWS Secre

<SdkExampleTabs snippetId={'API_CredentialProviderFromString'} />

For an example of how to retrieve credentials from AWS Secrets Manager, see [Retrieving a Momento auth token from AWS Secrets Manager](./develop/integrations/aws-secrets-manager).
For an example of how to retrieve credentials from AWS Secrets Manager, see [Retrieving a Momento auth token from AWS Secrets Manager](/cache/integrations/aws-secrets-manager).

For general information on Momento authentication, see [our auth page](./develop/authentication).

Expand Down
2 changes: 1 addition & 1 deletion docs/cache/how-to/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "How To",
"position": 4,
"position": 7,
"collapsible": true,
"collapsed": true,
"link": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Integrations",
"position": 6,
"position": 4,
"link": {
"title": "Integrations",
"description": "Integrations with other services."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ With this app, you can create, update, and delete items in a DynamoDB table, and

:::

Using the Momento [HTTP API](./../api-reference/http-api.md) and [Amazon EventBridge API Destinations](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html), you can trigger asynchronous events with a simple `PutEvents` call in your workflows. Here's how it works:
Using the Momento [HTTP API](/cache/develop/api-reference/http-api.md) and [Amazon EventBridge API Destinations](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html), you can trigger asynchronous events with a simple `PutEvents` call in your workflows. Here's how it works:

![Diagram of compute resources triggering an event that calls Momento](@site/static/img/eventbridge_destinations.png)

Expand All @@ -39,7 +39,7 @@ You optionally can provide the EventBridge event bus name that will rules will t

![CloudFormation UI with deployment parameters configured](@site/static/img/eb-destination-ui.png)

With the two parameters filled out, you can hit *Create stack* and the resources will be deployed automatically for you, optimized for your deployment region. *Wondering what that means?* Momento, like AWS, is region-based, and your auth tokens target a specific region. For the HTTP API, this means you must [hit a different base URL](./../api-reference/http-api.md#regions) depending on the region you wish to use. The quick start we've provided will determine the appropriate base URL upon deployment so you don't have to think about it 👍
With the two parameters filled out, you can hit *Create stack* and the resources will be deployed automatically for you, optimized for your deployment region. *Wondering what that means?* Momento, like AWS, is region-based, and your auth tokens target a specific region. For the HTTP API, this means you must [hit a different base URL](/cache/develop/api-reference/http-api.md#regions) depending on the region you wish to use. The quick start we've provided will determine the appropriate base URL upon deployment so you don't have to think about it 👍

This also means the integration will only work in the Momento-supported AWS Regions:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ Assuming you have a directory of RDB files located in `./redis` and you wish to
$ ./extract-rdb-and-validate.sh -s 1 -t 1 ./redis
```

The command will extract the RDB files in `./redis` to JSON lines format and write the output to the current directory. The `-s` and `-t` flags set the max size in MiB and max time-to-live (TTL) in days of items in the cache, respectively. If an item exceeds [Momento’s service limits](./../../limits), item size (5 MB), or a TTL (24 hours), that item will be flagged by the process.
The command will extract the RDB files in `./redis` to JSON lines format and write the output to the current directory. The `-s` and `-t` flags set the max size in MiB and max time-to-live (TTL) in days of items in the cache, respectively. If an item exceeds [Momento’s service limits](../../limits), item size (5 MB), or a TTL (24 hours), that item will be flagged by the process.

For more information, check out [Service Limits](./../../limits).
For more information, check out [Service Limits](../../limits).

### Inspecting the output

Expand All @@ -76,7 +76,7 @@ This is helpful in understanding which data lacks a TTL to understand what TTL t

To contrast, the `validate-lax` directory has data if the data:

- exceeds [Momento’s max item size](./../../limits), or
- exceeds [Momento’s max item size](../../limits), or
- is a type unsupported by Momento

The `validate-lax` directory contains data that is unsupported to load into Momento Cache and should be reviewed manually. For example, items with a TTL greater than the Momento max, items lacking a TTL, or those already expired can be addressed and then loaded into Momento.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ After pressing the `Create` button you'll see the new `worker` cache in the list

Notice the region you created your cache in is also displayed in the list of caches. You'll need to make sure that you choose the same region when generating a Momento authentication token in the next step. Navigate to the [tokens](https://console.gomomento.com/tokens) page, and choose the cloud provider and region you used to create your cache. Since the cache is already created, we will use a fine-grained token that will allow the worker to read from and write to the cache; but will not allow it to do control plane operations such as delete. This is especially helpful if you want to manage the security of control plane and data plane operations separately.

Choose the `Fine-Grained Access Token` token type, select `worker` as `Cache Name` from the drop down, and `readwrite` as `Role Type`. The `Super User Token` is used for managing control plane operations. More information about Momento authentication can be found [here](./../authentication/index.mdx). Hit the `Generate API Key` button.
Choose the `Fine-Grained Access Token` token type, select `worker` as `Cache Name` from the drop down, and `readwrite` as `Role Type`. The `Super User Token` is used for managing control plane operations. More information about Momento authentication can be found [here](/cache/develop/authentication/index.mdx). Hit the `Generate API Key` button.

![Generate token](/img/fgac-worker-auth.png)

Expand Down
Loading

0 comments on commit 1d9f270

Please sign in to comment.