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

Bun KV #18112

Closed
mckoda09 opened this issue Mar 12, 2025 · 12 comments · Fixed by #18812
Closed

Bun KV #18112

mckoda09 opened this issue Mar 12, 2025 · 12 comments · Fixed by #18812
Labels
bun.js Something to do with a Bun-specific API enhancement New feature or request

Comments

@mckoda09
Copy link

What is the problem this feature would solve?

(sorry for my english)
if i wanna build a high-perfomance game with storing some player data, key-value db is best option.

What is the feature you are proposing to solve the problem?

KV database, accessible directly from Bun

What alternatives have you considered?

Deno KV, bun-kv

@mckoda09 mckoda09 added the enhancement New feature or request label Mar 12, 2025
@kravetsone
Copy link

why not existing solution?

@mckoda09
Copy link
Author

i dont trust side solutions, only core and high perfomance ones

@RiskyMH RiskyMH added the bun.js Something to do with a Bun-specific API label Mar 12, 2025
@xorraxraxret
Copy link

i dont trust side solutions, only core and high perfomance ones

Just use Redis.

@mckoda09
Copy link
Author

mckoda09 commented Mar 12, 2025

redis is awesome, but sometimes small internal solution is better

@mckoda09
Copy link
Author

i used to create some telegram bots with deno, and kv was very handy

@jkbz64
Copy link

jkbz64 commented Mar 12, 2025

Bun Sqlite + CREATE TABLE kv (key TEXT PRIMARY KEY, str TEXT, int INTEGER, float REAL);

It should be fast enough 😆

@mckoda09
Copy link
Author

but then i need to build get, set, list functions...

@xorraxraxret
Copy link

but then i need to build get, set, list functions...

Do you know what a key value store is? Deno KV is not a locally hosted solution, it's in the cloud and you pay for it. Use Redis, it's fast as hell, and it's literally meant for this.

@mckoda09
Copy link
Author

yeah i understand, but kv is also useful for local projects. maybe something need to be changed, but isnt it a good idea?

@kravetsone
Copy link

yeah i understand, but kv is also useful for local projects. maybe something need to be changed, but isnt it a good idea?

Idk why it needed

If u want application get/set use map or bun:sqlite

if u want persistance - just use redis

its not hard to start redis server via docker

redis is industry standard and really fast solution

Deno KV is useless and built only for Deno Deploy (serverless)

@mckoda09 mckoda09 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 16, 2025
@Jarred-Sumner
Copy link
Collaborator

We probably will do a Redis/Valkey client eventually.

@mckoda09
Copy link
Author

ok, thats good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bun.js Something to do with a Bun-specific API enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants