7 ms·
Deno KV Is in Open Beta
- lucacasonato 3y agoI worked on some of this - happy to answer questions :)
- neals 3y agoIs it like a businessmodel for Deno?
- lucacasonato 3y agoYes, the hosted KV solution built into Deno Deploy is one of the ways Deno makes money.
- simonw 3y agoTypo in your blog post: "first processed at the primary pegion"
- simonw 3y agoWhen 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?
- lucacasonato 3y agoYes, 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/be1fc754a14683bf640b7bf0ecf6e286d02ee118/ext/kv/README.md#metadata-exchange https://github.com/denoland/deno/blob/be1fc754a14683bf640b7b...
- dabeeeenster 3y agoWhat's the cost of additional read regions?
- lucacasonato 3y agoStorage cost + write ops are multiplied by region count
- simonw 3y agoI 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 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 hosted service, that core API feature gets massively more powerful. It's no longer a SQLite database, it's now a globally distributed key/value store backed by FoundationDB, replicated around the world. It looks like they've extended that idea further with the latest version - you can now do this: export DENO_KV_ACCESS_TOKEN="personal access token" const kv = await Deno.openKv( "https://api.deno.com/databases/your-database/connect", ); And your local code is now able to manipulate that remote FoundationDB database as well. I'm having trouble thinking of a precedent for this - an open source project that has a core API which is effectively a lead generator for their proprietary cloud service. I'm not entirely sure how I feel about it. I think I like it: open source projects need a business model, and the openKv() method is still a supported, useful part of the open source offering. Kind of fascinating pattern though. UPDATE: I just found this page of docs https://github.com/denoland/deno/blob/be1fc754a14683bf640b7bf0ecf6e286d02ee118/ext/kv/README.md https://github.com/denoland/deno/blob/be1fc754a14683bf640b7b... - which describes the "KV Connect" protocol they are using. It looks like this evens the playing field, in that anyone could implement their own alternative backend to Deno Deploy if they wanted to. This firmly establishes me on the "I think this is cool" side of the fence.
- lobstrosity420 3y ago> I'm having trouble thinking of a precedent for this - an open source project that has a core API which is effectively a lead generator for their proprietary cloud service. Is this not Vercel’s entire business model? I don’t think they invented it either.
- lioeters 3y agoI suppose it's a variation on the "freemium" model.
- sgammon 3y agocongrats to the deno team on launching this :)
- lucacasonato 3y agoThanks <3
- paxys 3y agoIs "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 3y ago[deleted]
- simonw 3y agoIt's both. I wrote some notes on that here: https://til.simonwillison.net/deno/deno-kv https://til.simonwillison.net/deno/deno-kv
- dang 3y agoRelated: Deno KV - https://news.ycombinator.com/item?id=35743446 https://news.ycombinator.com/item?id=35743446 - April 2023 (11 comments)
- windowshopping 3y agoI 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 https://deno.land/x/semaphore@v1.1.2/semaphore.ts"; Should just be~ > import { Semaphore } from "deno/utils"; Or something like that.
- brundolf 3y agoDeno 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 https://deno.land/manual@v1.36.4/basics/import_maps
- blitz_skull 3y agoYeah, it's actually a _feature_ if you've never been lost in the shit show that is node_modules before. I highly prefer Deno's style.
- simonw 3y agoWhat syntax would you suggest for importing a specific version of a library?
- windowshopping 3y agoimport ... from "dino@1.1/utils" idk i just think there's many options besides a full url in your code
- joshstrange 3y agoI continue to watch Deno with excitement. I haven't had a good use case to play with it yet (all my free programming time has gone into my side business and I'm not ready to chance it on Deno yet) but I'll keep looking. I find the way they handle secondary indexes very interesting. I mean under the hood I think DynamoDB does pretty much the same thing (stores the data multiple times) but instead of explicitly writing the data multiple times you define fields on the data that the secondary indexes use so the data is written there at the same time it's written to the primary (I could be a little mistaken, I'm working at a higher abstraction layer so I don't think about that). I can't decide which approach I like more. I will say that I don't think I'd need anything but my own abstraction layer to work with Deno KV vs DynamoDB. That said I still think DynamoDB is way more powerful overall. As always I'm rooting for Deno to succeed.
- gsuuon 3y agoDeno gives me hope for web development. The security model, no bundler and general pace of progress is great. They've drastically improved node interop but if they could close the gaps (and sort out extension/less imports) so many more projects could finally jump ship over to Deno.
- deleted 3y ago[deleted]
- debrateo 3y agoCongrats on the launch!
- _m8fo 3y agoHow has using foundationdb been? What have been the biggest pros? The biggest cons? Would you use it again (one alternative could have been TikV).
- predictabl3 3y agoGenuine question, are there folks hyped about Deno that don't come from a nodejs background?
- simonw 3y agoMe. I'm excited about what they're doing with their security stuff (I love that it can only access files that were explicitly allowed) and it feels like there's a ton of good ideas in there generally. My notes so far: https://simonwillison.net/tags/deno/ https://simonwillison.net/tags/deno/
- johnspurlock 3y agoYes.