Pricing? I thought Deno was some sort of node.js replacement. What am I missing and can I use this either locally and/or self hosted without paying for it?
This is the same trick as the rest of Deno KV: the open source version uses SQLite, but when you deploy to their cloud product you get Foundation DB (proprietary) instead: > Since Queues are built on Deno KV, it uses SQLite when running locally and FoundationDB when running on Deno Deploy for maximum availability and throughput. I wrote a bit more about this pattern here: https://til.simonwillison.net/deno/deno-kv
Deno Queues
61–70 of 168 posts
Re: Deno Queues
#62Earlier quoted context omitted.
If they want to have these primitives then I’d prefer to have a “universal” queue API that would work with SQS, Kafka, etc. with some magic. But the developer API could be just deno.Queue or whatever
Why try to standardize the interface at all? This isn't the job of a programming language, and there is no way it can anticipate all the possible use cases. Let each service publish their own bindings, and you can a programmer can consume whichever ones you want.
Deno is basically trying to be an infrastructure framework for JavaScript.
Re: Deno Queues
#63Under the hood, does DenoKV implement an abstraction that specializes locally to SQLite and to Deno Deploy in the cloud? Or are DenoKV local and DenoKV cloud two separate products with a common public API?
The API is standardized for both.
Re: Deno Queues
#64Re: Deno Queues
#65I wonder how this differs from BroadcastChannel[1] which Deno already implements and DenoDeploy seems to support. [1]: https://docs.deno.com/deploy/api/runtime-broadcast-channel
Re: Deno Queues
#66Earlier quoted context omitted.
This is the same trick as the rest of Deno KV: the open source version uses SQLite, but when you deploy to their cloud product you get Foundation DB (proprietary) instead: > Since Queues are built on Deno KV, it uses SQLite when running locally and FoundationDB when running on Deno Deploy for maximum availability and throughput. I wrote a bit more about this pattern here: https://til.simonwillison.net/deno/deno-kv
Simon, I love reading your TILs. What's your process? Is there a TIL on writing TILs? :)
I keep very detailed notes on everything I'm doing already - either as a VS Code scratch document or Apple Notes or often a GitHub Issues thread. A lot of my TILs start by me pasting those notes into a Markdown file and tidying them up.
Re: Deno Queues
#67The most interesting detail is probably the schema they're using for that:
CREATE TABLE queue (
ts integer not null,
id text not null,
data blob not null,
backoff_schedule text not null,
keys_if_undelivered blob not null,
primary key (ts, id)
);
CREATE TABLE queue_running(
deadline integer not null,
id text not null,
data blob not null,
backoff_schedule text not null,
keys_if_undelivered blob not null,
primary key (deadline, id)
);
CREATE INDEX kv_expiration_ms_idx on kv (expiration_ms);Re: Deno Queues
#68Earlier quoted context omitted.
I have tried to be excited about Deno, but just don't see it. What are they doing that hasn't already been done a hundred times in the past? Deno itself is essentially Node.js + automatic TS compilation (which would otherwise have been 1 extra config file). When the project launched they made a big deal about escaping from the messy NPM ecosystem, but then ended up having to turn around and add support for it, taking…
I think you're underestimating just how much tooling Deno has built-in. It's not just automatic TS compilation, but formatting, linting, testing, and benchmarking at the bare minimum. I use those for almost every project. Each of those would probably be at least another configuration file. About Deno Deploy, I completely disagree with the analysis that it's just like any other lambda service. It's not just about easy…
Do you know how they're doing that, technically? Is it running on Cloudflare under the hood, or if not does it have a similar set of tradeoffs and benefits vs Lambda? Or is it a third completely different way with different tradeoffs/benefits?
Re: Deno Queues
#69Earlier quoted context omitted.
Node is not a language.
Since you're going to be pedantic, I will be too. Language is more than syntax. Language is the combination of Syntax and Meaning; its a system of communication. The word "Fooloofol" is syntactically correct English, but meaningless within the English language; and thus is not English. The english word "bark" is syntactically identical across more than one meaning; a dog barks next to the tree bark. Language isn't ju…
Re: Deno Queues
#70In case anyone wonders what this would make possible out of the box: https://apple.github.io/foundationdb/design-recipes.html