Skip to content

Commit

Permalink
fix: fixing verbiage on http api vs web sdk on cloudflare
Browse files Browse the repository at this point in the history
  • Loading branch information
pratik151192 committed Aug 10, 2023
1 parent e422ecb commit e09d08f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
14 changes: 7 additions & 7 deletions examples/cloudflare-workers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ This directory contains subdirectories for two types of example projects to use

There are a few reasons why you might choose one over the other when interacting with Momento within a Cloudflare Worker.

- The HTTP APIs is more flexible. You can use it to interact with Momento, regardless of the programming language or framework
you're using. This makes it a good choice if you need to integrate with a wide variety of services.
- The Web SDK is more convenient. They provide a higher level of abstraction, which can make it easier to interact with Momento.
- Using the HTTP API might be more efficient and can be optimized for exactly what you need, leading to performance benefits.
They don't require the overhead of loading and initializing a web SDK. This can be important if you're running a high-traffic Worker.
- Web SDKs are easier to use. They provide a lot of built-in functionality, such as error handling, observability, authentication, etc.
This can save you time and effort when developing your Worker.
- The HTTP APIs is lighter-weight; you don't need to add any dependencies, you can just use the standard `fetch` HTTP
client methods. However, it only provides a basic subset of all of the Momento APIs, such as `get`, `set`, and `delete`.

- The Web SDK is heavier-weight; you need to add a dependency on the SDK. However, it supports the full Momento API
(including collections like Dictionaries and SortedSets, plus the ability to publish to Momento Topics). It also has a
complete TypeScript/JavaScript API that makes it simpler to write code to interact with Momento. This can save you time
and effort when developing your Worker.
8 changes: 6 additions & 2 deletions examples/cloudflare-workers/http-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

This example uses
[Wrangler](https://developers.cloudflare.com/workers/wrangler/) to create a
typescript worker and interacts with Momento using its HTTP API. To use Momento's Web SDK
instead, click [here](../web-sdk)
typescript worker and interacts with Momento using its HTTP API.

The HTTP APIs is lighter-weight than the Web SDK; you don't need to add any dependencies, you can just use the standard `fetch` HTTP
client methods. However, it only provides a basic subset of all of the Momento APIs, such as `get`, `set`, and `delete`.

To use Momento's Web SDK instead, click [here](../web-sdk).

## How to use

Expand Down
10 changes: 8 additions & 2 deletions examples/cloudflare-workers/web-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@

This example uses
[Wrangler](https://developers.cloudflare.com/workers/wrangler/) to create a
typescript worker and interacts with Momento using its Web SDK. To use Momento's HTTP API
instead, click [here](../http-api)
typescript worker and interacts with Momento using its Web SDK.

The Web SDK is heavier-weight than using Momento's HTTP API; you need to add a dependency on the SDK.
However, it supports the full Momento API (including collections like Dictionaries and SortedSets, plus the ability to publish to Momento Topics).
It also has a complete TypeScript/JavaScript API that makes it simpler to write code to interact with Momento. This can save you time
and effort when developing your Worker.

To use Momento's HTTP API instead, click [here](../http-api)

## How to use

Expand Down

0 comments on commit e09d08f

Please sign in to comment.