Live data from Hacker News

Deno KV Is in Open Beta

deno.com

11–20 of 60 posts

Re: Deno KV Is in Open Beta

#11
post #4

I poked around with this a few months ago to figure out how it works locally. The answer is SQLite: https://til.simonwillison.net/deno/deno-kv I'm finding the business model aspect of Deno KV absolutely fascinating. const kv = await Deno.openKv(); That's a Deno core API. It works fine in the open source version of Deno using a local SQLite database file. But as soon as you deploy your application to their proprietary…

This is the enshittification of open source. It has been happening for a while with a bunch of startups like Supabase claiming to be "open source" and marketing themselves as such but making it really hard to self host for a long time. It wasn't just them either. I would see with disgust a bunch of startups use "open source" as their marketing tactic, no matter how hard it was to setup or run without their hosted ser…

Does this change your mind at all? https://github.com/denoland/deno/blob/be1fc754a14683bf640b7b...

It looks to me like they've documented the KV Connect protocol they invented to support this feature, in enough detail that anyone else could build an alternative backend for it.

This has helped me feel completely OK with how they're handling this. They get an advantage in that they've already built an extremely robust proprietary backend, but I find that acceptable given the documented protocol.

Re: Deno KV Is in Open Beta

#12
post #9

Is "Deno KV" a feature of Deno the runtime or Deno the hosting provider? The docs aren't clear about what it actually is, and that makes me a bit wary when deciding to use it.

[deleted]

Re: Deno KV Is in Open Beta

#14

I worked on some of this - happy to answer questions :)

When you run `kv = await Deno.openKv()` locally it opens a SQLite database. On Deno Deploy it opens a connection to FoundationDB. How does that mechanism work? Is it using the same URL mechanism as the new Deno.openKv(URL) thing?

Re: Deno KV Is in Open Beta

#16
post #4

I poked around with this a few months ago to figure out how it works locally. The answer is SQLite: https://til.simonwillison.net/deno/deno-kv I'm finding the business model aspect of Deno KV absolutely fascinating. const kv = await Deno.openKv(); That's a Deno core API. It works fine in the open source version of Deno using a local SQLite database file. But as soon as you deploy your application to their proprietary…

NextJS / Vercel is not the same thing but shares similar approach

Re: Deno KV Is in Open Beta

#17
I don't know enough about this to make any real nuanced comments, but I hope they clean up this import cuz this is ugly:

> import { Semaphore } from "https://deno.land/x/semaphore@v1.1.2/semaphore.ts";

Should just be~

> import { Semaphore } from "deno/utils";

Or something like that.

Re: Deno KV Is in Open Beta

#18

I don't know enough about this to make any real nuanced comments, but I hope they clean up this import cuz this is ugly: > import { Semaphore } from " https://deno.land/x/semaphore@v1.1.2/semaphore.ts "; Should just be~ > import { Semaphore } from "deno/utils"; Or something like that.

Deno has various mechanisms[0] for abbreviating your imports if/how you want to, but I like the fact that the canonical paths are plain, full URLs

[0] https://deno.land/manual@v1.36.4/basics/import_maps

Re: Deno KV Is in Open Beta

#19
post #14

I worked on some of this - happy to answer questions :)

When you run `kv = await Deno.openKv()` locally it opens a SQLite database. On Deno Deploy it opens a connection to FoundationDB. How does that mechanism work? Is it using the same URL mechanism as the new Deno.openKv(URL) thing?

Yes, sort of - on Deno Deploy the authentication doesn't come from a token in env vars, but from intrinsic security tickets baked into the Deno Deploy system. Also, it's a bit faster on first connect, because compared to KV connect we can skip the metadata exchange[1] because the information it provides is already present in Deno Deploy through other means. Both the backend service and frontend API (JS->KV) is the same though :)

[1]: https://github.com/denoland/deno/blob/be1fc754a14683bf640b7b...

Post reply on HN