Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] use in memory object instead of Cloudflare KV API for demo app #4266

Closed
wants to merge 10 commits into from

Conversation

baseballyama
Copy link
Member

fix: #4264

I am accessing the Demo app from Tokyo but the response is not good.
I considered using indexedDB or Session Storage but did not adopt them because it is important that this process be performed on the back end.
And the process should not be complex to avoid making noise, so I finally opted for a simple in-memory object.
Any opinions for a better demo app?

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot
Copy link

changeset-bot bot commented Mar 7, 2022

🦋 Changeset detected

Latest commit: b909690

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
default-template Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gtm-nayan
Copy link
Contributor

@baseballyama I thought using a Map would be more semantically correct, and abstracting the db operations would help with readability, so I've made a PR over at your branch baseballyama#6

@gtm-nayan
Copy link
Contributor

The abstractions should make it easier to add some persistence as well if needed.

@baseballyama baseballyama marked this pull request as draft March 10, 2022 00:39
@baseballyama
Copy link
Member Author

I don't think there is consensus on this PR yet, but I have modified it so that we can try both in-memory objects and Cloudflare KV API.
This allows us to use in-memory objects by default, but also to demonstrate using the API.
I'm not sure if we should inform users of this by some means, but I don't think it is necessary at this time.

This is a just proposal, so please close it if it is not in line with the core team's decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove network calls from demo app
3 participants