https://github.com/cryptoking-max/worth

https://github.com/cryptoking-max/worth

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.1%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: cryptoking-max
  • Language: TypeScript
  • Default Branch: main
  • Size: 303 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme

README-REQUIREMENTS.md

npm install npm run dev

npm run deploy


D1

{ "id": "123-abc", "firstName": "Lane" }

KV

{ "id": "123-abc", "firstName": "Lane" }

In Memory

Maybe don't use bc we can't update on all nodes. May need to confine cache to kv

Select

Once we have the data from a GET, we can: 1. Cache it using the Cloudflare cache API 2. Store it in memory (edge servers limited to 128MB)

The challenge is, how do we know when to invalidate the cache?

Is cache api global, if so that is great Is the cache api per node? if so might as well use memory

If using memory, how to be notified that data has been updated?

maybe go back to KV, and forget in memory caching? what is the latency delta?

maybe use Durable object?

Is KV lookup a slow process, if so maybe manage list of cache urls .

Static Global, page speed plus 180-240 (pingdom ~ 150mx) KV global, page speed plus, is around 300-400ms (pingdom is < 200ms) so maybe we can have aggressive setting that caches in local memory maximize low latency

Update/Delete

Update record "123-abc": 1. Update D1 1. Get List of cache items containing "123-abc" 1. Invalidate cache items from above list 1. 123-abc | /v1/users?limit=10 1. 123-abc | /v1/users?firstName=Lane 1. 123-abc | /v1/users?id=123* 1. Now rehydrate the cache for the affected cache item: 1. /v1/users?limit=10 1. /v1/users?firstName=Lane 1. /v1/users?id=123*

Insert

Inserts are tricky because any list could be affected.

Do we need to invalidate all lists that have a dependency based on the source table

For example if we insert a new user record, we also need to track all cache item lists that could be impacted by a new user

Anything with a cache key like: /v1/users* /v1/users?limit=10 /v1/users?limit=20

Then async update all affected caches

Key Tracking

Do we need to track all previous urls so that we can rehydrate?

Lock and Questions

Do we need to prevent close subsequent calls from returning stale data? maybe use in memory just on node where the update/delete/insert occurs so we can quickly return non stale data maybe update lists instead of replace? yes - then we don't have to run a query to re-select but then joins get messy what is fields are updated that aren't used in joined queries?

if we pass insetts, updates and deletes thru edgecache, will those be materially slower?

what if there is an advanced update that updates several records in multiple tables? How are we supposed to detect cache updates on that? Maybe we nneed to allow the developer to hit our API to manually trigger cache updates in such cases.

Use ML to learn which endpints need to be updated with each PUT/POST/DELETE

KV Dependencies

We must track every dependency for each record in the source database

We don't need to store any system of record data

|record| url | | ---- | -----| |123-abc | /v1/users?limit=10 | |123-abc | /v1/users?firstName=Lane | |123-abc | /v1/users?id=123* |

|table| url | | ---- | -----| |users | /v1/users?limit=10| |users | /v1/users?firstName=Lane| |users | /v1/users?id=123*|

|table| url | | ---- | -----| |users | /v1/usersWithOrders?limit=10| |orders | /v1/usersWithOrders?firstName=Lane|

MVP

## 1.0 - GETS - Read only API - Cache expires after 24 hours by default - Developers can set their own time to expire - CLI only, no web app - Developer must manually invalidate cache

Process

  1. Build MVP
    1. Tenant provisioning
  2. Build CLI
  3. Reach out to Beta users on LinkedIn
  4. Build Marketing Website

1.1

  • Developer can set cache TTL

1.2

  • Add dependency tracking (High Effort)

1.3

  • Use machine learning to determine appropriate cache invalidation

Technical Requirements

Owner

  • Name: Solana sniper copy trading bot
  • Login: cryptoking-max
  • Kind: user
  • Location: solana trading bot
  • Company: solana trading bot

#Solana #sniper #copy #trading #bot

GitHub Events

Total
Last Year

Dependencies

.github/workflows/static-analytics.yaml actions
  • actions/checkout v4 composite
  • actions/setup-node v4 composite
.github/workflows/unit-test.yaml actions
  • actions/checkout v4 composite
  • actions/setup-node v4 composite
package-lock.json npm
  • 764 dependencies
package.json npm
  • @faker-js/faker ^9.6.0 development
  • @playwright/test ^1.50.1 development
  • @types/node ^22.7.3 development
  • drizzle-kit ^0.24.2 development
  • vitest ^2.1.1 development
  • wrangler ^4.0.0 development
  • @astrojs/check ^0.9.3
  • @astrojs/cloudflare ^11.1.0
  • @astrojs/react ^3.6.2
  • @astrojs/tailwind ^5.1.1
  • @headlessui/react ^2.1.10
  • @heroicons/react ^2.1.5
  • @node-rs/argon2 ^1.8.3
  • @oslojs/crypto ^1.0.1
  • @oslojs/encoding ^1.1.0
  • @tailwindcss/forms ^0.5.9
  • @tanstack/react-table ^8.20.5
  • @types/nodemailer ^6.4.16
  • @types/react ^18.3.11
  • @types/react-dom ^18.3.0
  • astro ^4.15.9
  • drizzle-orm ^0.33.0
  • javascript-time-ago ^2.5.11
  • nodemailer ^6.9.16
  • qs ^6.13.0
  • react ^18.3.1
  • react-dom ^18.3.1
  • tailwindcss ^3.4.13
  • typescript ^5.6.2