Hacker News new | ask | show | jobs
by hpeter 769 days ago
I think Deno KV is a great tool with a nice API, it's great to see how it works. Really well designed.

I used it a couple of times locally with Sqlite for CLI apps, if you want to do some data manipulation stuff with TS from the CLI and need a db, don't look further.

I also used it in Production with FoundationDB on Deno Deploy.

It does not replace your postgres/mysql database but a different beast entirely for many reasons. One is pricing. You pay per read and write.

An issue I had is that it's hard to migrate from using KV with Deno Deploy. You can migrate to a local SQLite backed instance but will need to develop your own solutions on how you migrate and it will cost more the larger your database gets because you pay for reads.

I do think it's great, but I would recommend using Deno Deploy only if your reads and writes produce value that offset the costs, else you can find yourself in the issue of needing to migrate.

For example, use it for features you offer to authenticated users, but don't use it for things available in the open, else you open up yourself to high fees from DDOS.

3 comments

> I used it a couple of times locally with Sqlite for CLI apps, if you want to do some data manipulation stuff with TS from the CLI and need a db, don't look further.

Are any of the these tools open source? Would love to look at what you're doing

I often build project specific tooling, to generate code or just transform some data, but maybe someday I create a FOSS version I can share.

Stuff like parse some XML or JSON and output Go structs and functions and Typescript types and functions, HTML,React Components, SQL Tables, Stored functions, Pl/PGSQL.

Mostly to avoid writing boilerplate when I use the same data structures in the database, middleware, client. For simple CRUD apps, it works well. I use local KV to track changes so I don't have to rerun things I don't need.

But Deno is great for CLI reporting tools or Scheduled tasks, fetch and aggregate data.

I think of Deno as a little swiss army knife. It's a tool that got everything built in.

I use the Repl a lot, just for a specific task, get it done then move on.

You can now back it up to Google Cloud Storage and Amazon S3. KV is still in beta, its only going to get better.
For reads, maybe in-memory caching would help with DDOS?
Deno charges for "inbound HTTP requests", so the DDOS can just query uuids till your checks start to bounce