Deno raises $21M
deno.com
deno.com
> For example, it is integrated with GitHub in such a way that on every push it will provision a new server running specifically that code, deployed to the edge, worldwide, and persisted permanently. Want to access the code your app was running a month ago at commit f7c5e19? It will be served up instantly at a moment's notice. It costs you nothing to have that bit of JavaScript responding to requests indefinitely.
These things sound great and almost a dream come true but how realistic is it to consider being able to do this in most web apps? As soon as your application uses a SQL database and you have database migrations then you're out of luck because a commit from 2 months ago might expect a different database schema than the current version and while it's common to migrate in backwards compatible ways, the backwards compatibility is usually only temporary until you finish migrating from A to B.
Long story short, this sounds cool but in practice is really only applicable to static sites or dynamic sites where you plan to keep a version of your database and code base backwards compatible from day 1 to current day (which I've never seen done in any app developed over the last ~20 years of freelancing for many different companies). The post mentions "The open source Deno runtime shows how clean and productive a modern, batteries-included, programming environment can be" so it sounds like they expect you'll be running database backed apps and not only static sites.
Let’s charitably say you can run your app with a 1GB cut down snapshot of production.
You’re going to do what, save a snapshot of the database for every commit? Every schema migration?
…and then provision that up in a running database server… which is notoriously not container friendly…
? It doesn’t sound very plausible to me.
Our database is ~1TB, and the app runs with maybe a 10GB cut down version of it, which is a pain in the ass to deal with, just for example, for local dev environments.
I agree with the parent post; it’s cute, but I can’t imagine historical per commit deployments being useful for me, honestly.
Plenty of apps can run from an empty database, if the data storage is focused on resources you, the user, have created for yourself.
But I imagine that people with their heads in the future are imagining you'll use one of these new database startups (the names escape me) to manage snapshots, seeding from anonymised production data, etc.
Most of our effort is in user experience and post processing.
It would be nice to compare the experience of todays version with one from 6 months or 1 year ago for certain components.
We do already have a historical design storyboard but seeing it with live data would be more useful.
Just fire up a fresh DB with some sensible default fixtures.
Or pause an integration test mid-way.
Or call some factories from the REPL.
The last thing in the world I want to do development with is production data. Production data is the data of last resort when nothing else can repro.
1. Old version
2. Old version/new version both live.
3. New version live after step 2 is confirmed as fully done.
We could do with some more consciousness for energy & compute resources in this industry, as decoupled it may be from the real world, clicking the button to deploy an EC2 instance somewhere does use real power and will contribute to hardware wear.
It suggests you'll be running a datastore, not necessarily an SQL database (the most overrated technology in existence IMO, especially for web apps where essentially none of its strong points are relevant). Storing old data as-is and migrating on read is definitely doable, and you can keep backwards compatibility to day 1 that way relatively easily. I worked on a system much like the one from "An oral history of Bank Python" that did exactly that, and had been doing so on a large scale for around a decade. Having a better-integrated datastore that can present multiple views of the same data is another way to achieve that, if you want to keep the migration out of the "application" code.
Other architectural patterns offer the same kinds of options. Clean architecture or hexagonal architecture limits the surface (coupling) between your versioned logic and the data so much, that they can version independent.
Alas, most web development uses some ORM as the center of the app. Active record, for example. An architecture known for its immense and tight coupling to the database. An architecture that has as major downside that businesslogic cannot evolve separate from the data store.
Your parent commentor very likely is, unaware, running into this downside and projects that experience to all of web development.
> event sourced architecture
You must be joking. Please tell me you're joking.
I'm not saying event sourcing is a more pragmatic (practical) solution. I'm giving an example from practice.
> Storing old data as-is
What does this mean? Can you give an example?
I've used Cassandra very successfully, but there are plenty of options.
> > Storing old data as-is
> What does this mean? Can you give an example?
I mean not migrating the stored version of old data (note I'm not suggesting "no schema" or anything like that; what I'm opposing is the idea that you have a single global mutable version of the schema and mutate historical records in place to match that). E.g. if you started by storing users with a single nationality field and then realised that actually the same user can have multiple nationalities, while you'd change the DTO representation of a user that you read into, you wouldn't rewrite the on-disk representation of previously stored users.
SQL has earned its place due to the expressiveness and flexibility .. you may hold your opinions but you'll hardly find anyone who would take 'SQL is overrated' seriously.
The nice thing about Deno conceptually, is that it's much more similar to the browser platform than node is. It uses ES6 only, has things like `fetch` built-in by default, and generally follows browser standards around interfaces like Request, Response, etc. Instead of needing a complicated build process to make Node code work on the browser, now we have a complicated build process to make Deno/Browser code work on Node. ¯\_(ツ)_/¯
(node:340760) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(some later blog posts that mention fetch being enabled-by-default and in the global scope are https://nodejs.org/en/blog/announcements/v18-release-announc... and https://nodejs.org/en/blog/release/v18.0.0/)https://github.com/esm-dev/esm.sh/issues?q=is%3Aissue+is%3Ao...
Grandparent confuses correlation for causation.
Let's say a company were to adopt this tech over Node, well, it seems like it would be slightly better, but probably not much of a game-changer.
I'll leave it to y'all to talk about what tech is truly interesting as I don't want to seem ideological/biased, I just don't see how Deno is particularly notable.
In that, Deno reminds me of the once-hyped Meteor.js. Meteor.js also though that funding could be the answer, but it wasn't. They're both clever, great for demos, but not sufficiently so to overcome the sheer inertia of Node+NPM et al. When something truly 10X better arrives, it will be quite apparent. Just like how React spawned a new generation of frameworks, nothing has unseated it yet because all the competition is React-like and not 10X better.
I first saw Ryan Dahl's talk about his Node.js regrets[0] during the early days of the pandemic. I thought I'd be eager to try Deno when it became more mature, but I still haven't tried it. I guess I'm not convinced that it's 10x better than Node.js.
In substance they are similar in that they both want/ed tighter "vertical integration" of tools ("DX") in an opinionated way, with the money-making plan being convenient paid hosting. "Look how easy and fun it is to make powerful stuff; we hope you give us money to host it for you!" So far the only company that's had success with this pitch is Amazon of all people, by offering a staggering array of partially specialized EC2 instances behind an API.
For whatever reason, it does seem like devs really like their app authoring tools to be independent of their distribution mechanisms. Maybe AWS doesn't trigger this because it doesn't feel like hosting (even though it is). When a whole diverse community seems to act coherently in this way, it's probably a good idea to listen to them. (Alternatively, when a community acts coherently, its ALSO a good idea to try something new.)
Deno is quite good. It may even be 10x node, if only because it avoids npm and has a much more thoughtful module system. It's a (much) better DX, too. Can they make money? Time will tell and, luckily, that's not my problem!
I think NextJS and Vercel probably fall into this bucket as well.
I agree with the overall sentiment, but this is a bad example. SVN was pretty successful at replacing CVS, even though it was not 10x better.
Until, of course the new generation came in (git, mercurial...).
xckd is full of examples of much "better" it happens to be in reality.
I agree here, but
> Let's say a company were to adopt this tech over Node, well, it seems like it would be slightly better, but probably not much of a game-changer.
If I'm starting a new project, Deno will be compelling if it means zero configuration with sufficiently sane defaults. It's like Rails vs Ruby. With Node.JS, you can pick and choose then configure things like TypeScript, but then you have to manage configuration files for TypeScript, linting, and all these things not relevant to the app code.
As far as I'm concerned, as of right now Deno is _not_ better that node due to reasons above. It has the potential to be, and I wish the authors massive success and root for them. But I'm not gonna start a project on Deno due to lack of a proper ecosystem yet.
If there’s any area of modern software development that could benefit from a clean slate like Deno is attempting, it’s JS development.
Deno is working on the runtime, the cloud infrastructure, the dx, and a framework (fresh). Nobody is doing that afaik. I think this is where the value lies.
I think the place they can really sell me is:
- source maps
- debugging
It’s an absolutely PITA to get those two things working across a JavaScript stack. There are so many runtime contexts to deal with:
1) the browser
2) your API server
3) your frontend test env
4) your API server test env
5) browser and backend for your end to end/integration tests
6) pre-packaged code from secondary repos you are importing into all of the above
7) All of the above in CI
8) Special production builds of much of the above
It’s truly a nightmare. I’ve been trying to set up a fresh JavaScript full stack and it’s so much work. Every step of the way I need to take days off to do deep research into how to set this stuff up.
And it starts to make sense why no company I’ve ever worked at had all of that stuff working. You just deal with wrong stack traces and use console.log instead of a debugger in the places where it doesn’t work.
If Deno can provide all of those runtimes in an integrated way, with debugging and source maps working automatically that’s a total game changer.
And I’m honestly not sure who else could do it. Maybe like Next/Nuxt and all them? But do those projects handle build/packaging across multiple repos? I don’t think so…
Deno can nail that because they own packaging, and they can just skip the whole build/sourcemap step entirely and just distribute .ts files.
If I remember my Javascript-of-the-week-drama correctly, didn't Deno become a thing because a couple node/npm devs were upset that there was someone in the core node/npm team who did a bad thing?
Am I remembering this right?
Deno Deploy (and Cloudflare Workers) is a big deal. At least for a small tech shop like ours, I've come to found it useful for >50% of the solutions we have to implement. Its simplicity and cost-effectiveness reminds me of S3 back when it launched: 5 APIs and pay-what-you-use billing. Sure, right now, Deno Deploy's capabilities are limited, but there's nothing stopping them from building a platform around it as they go along, and now they've got $21M reasons to keep at it.
I see parallels of Zeit/Vercel meteoric rise (no pun) in Deno.
Not the web I intend to build and participate in, I can tell you that right now.
I'm sure Deno will tell you the future is Deno. You don't have to believe them.
So if there was a compiler/interpreter for another language that was close to being as good as V8, then something like this could exist for other languages.
Also, it looks like wasm works on Deno, so that gives some other languages.
For everything else, there’s JavaScript.
Luckily projects like typescript solve those issues, or try to.
With anything else you need a two language application.
Going from one to two is a MASSSIVE increase in developer overhead.
Not sure that outweighs the downsides of JavaScript, but that’s how I’d dispute your “no reason” claim.
Like LuaJIT that has been around longer than V8?
[ disclaimer: i was a V8 contributor 13 years ago, and it is good, but it is not the only game in town ]
I'd rather work for a monoculture than a cowboy pick-whatever-you-want one; it's not a dichotomy, sure, but I'm aware of the latter for business continuity. You run into scaling and talent acquisition issues. Bus factor. Etc. If you as a company can say "We need a Deno developer" instead of "We need a full-stack Javascript/NodeJS/Scala/Java/Go/Rust/Erlang developer" (just to name a random array of languages) you can hire and train a lot better.
This is funny to me because serverless sounds to me like the return of PHP (etc) shared hosting. What's old is new again?
[0] Used here as shorthand for “modern js driven development”
Nobody is reinventing PHP or RoR development. What is happening is the community taking all our favorite parts of these stacks and combining and implementing them in ways that facilitate a dev experience that we could only have dreamed of back in the PHP/RoR days.
- Senior dev that started off in the PHP and then RoR days
- Engineering Lead who got his start in PHP/ASP(pre .net) and loves the modern ecosystem despite its flaws
The evolution has been 2 steps forward but 1 step back. It’s how many complex systems evolve and it’s fine. Just because you see that some problems/solutions resemble what you saw 10 years ago doesn’t mean nothing was improved along the way.
PHP is an unsafe, slow by default (execution model - the language itself fast), hard to use well, clunky, limiting and bloated language that is kept together by duct tape and the incredible effort and ingenuity of it's open source community by educating developers and improving/cleaning up the language at full blast, unfortunately often by breaking backwards compatibility.
Whether JS (including Deno) is a good alternative or the right answer is up for debate. But people who try to mimic some of the benefits of PHP in the JS ecosystem are not doing so accidentally or because of lack of experience.
I am an optimist in that I (have started to) believe that this slowly allows us to converge on better solutions for everything.
PHP was easy to set up, easy to host, easy to understand and easy to build stuff with, but it resulted in an unmaintainable mess over the long run.
Then Node was all of that, but JS was a better language than PHP. Then Node grew warts in the form of the clutter that is npm, then it grew complex build systems and unstable libraries.
Now there's Deno. It uses TypeScript by default, which is a surprisingly useful and productive language, it rethinks some things, it's much more secure by default, and now we're back at the PHP-level easiness to host using Deno Deploy.
We've ended up with an overall better solution and it only took us 20 years :)
Ya. Like a spiral. Or a spring, if you want to get fancy (add z-axis for time).
Each revolution seems redundant, but can be exploring a slightly different problem space, or trying a solution with a new angle.
rolls eyes
Outside HN that distinction might not be important. Here being pedantically correct does matter on this because the VM abstraction has been around for a long time, whereas containers were an enabling technology for serverless.
And containers and the fast startup, security and resource consumption guarantees they offer is a big difference to the old days of shared PHP hosting.
And this is why "reinvention" with new technology is different.
https://firecracker-microvm.github.io/
Firecracker is a virtual machine monitor (VMM) that uses the Linux Kernel-based Virtual Machine (KVM) to create and manage microVMs. Firecracker has a minimalist design. It excludes unnecessary devices and guest functionality to reduce the memory footprint and attack surface area of each microVM
“How AWS’s Firecracker Virtual Machines work”
https://m.youtube.com/watch?v=BIRv2FnHJAg
The Lambda service team always emphasizes the level of isolation that Firecracker VMs gives you that containers don’t.
That's being addressed by the new Web-interoperable Runtimes Community Group https://wintercg.org/, driven by Deno and others.
Seems like the standard arguments would be that developers already know JS, and that you can share code with the browser. I don't find these highly compelling.
EDIT: I haven't learned typescript yet, based on the replies, it seems like that could be a good reason to choose it. Seems like a nice middle-ground between typical scripting and compiled languages.
I'm coming around on Elixir.
I never want to write Go that interacts with a database again.
Rust seems complicated. I don't think I'm smart or committed enough to get anywhere with rust.
Why? I’ve been using sqlx and it seems fine.
Rust is a bit rough yet to do the front and backend development, but IMHO it will catch in a year or two. Also for backend rust now with (actix and axum) looks pretty similar to expressjs, so you will feel like home there, but for the frontend there's still no killer framework nor a settled architecture that fits better rust model.
I LOVE Go ! I think it's the bee's knees until you have to write DB code ! I'm hoping "go generics" will take care of some of the table-mapping/orms/multiple-types etc madness.
But yea, I still love go :)
FWIW, I think Typescript would make an even stronger case. And I think(?) that's one thing Deno is trying to do.
The benefits are in my mind not that you can share code directly but more that the std lib is the same (mostly) between backend and frontend. This means no mental context switching for developers.
The other bonus is that typescript is just such a lovely thing to code in. Expressive, universal and ubiquitous, performant - modern JS is a joy to use (...if you don't need to use NPM... If you need to use NPM at all then it is a shit show)
(but still: don't underestimate the raw performance of V8, for many things it's definitely good enough)
> It seems like people jumped to node based on some performance promises that didn't really pay off (IMO). And since then, we have newer options like Rust, Go, and Elixir as performant back-end options, and even older choices like Ruby and Python have continued to improve.
I'd agree that Node.js performance is generally not the best reason to be writing a backend in it since a static language will often yield better performance, but for the amount of dynamic power you get, it's extremely performant by default[1]. The next most performant dynamic language for I/O is, like you said, probably Erlang/Elixir, but V8 is generally understood to have better CPU-bound performance than BEAM.
[1]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
> Seems like the standard arguments would be that developers already know JS, and that you can share code with the browser. I don't find these highly compelling.
I've found that developers already knowing JS is a very practical reason, if not ideological. I'm in a team with a lot of generalists who like to work full-stack, and being able to use the same mental models and syntax is a lot of cognitive load lifted off our shoulders. It also doubles the hiring pool of people who can hit the ground running on the backend, because now anyone who has experience with JS on the frontend can jump over to the backend with relatively little training.
The other key reason for a backend in JS is that the community is extremely large, which means that a lot of the troubleshooting I'd have to do in languages with smaller communities is done for me by someone who was kind enough to post a workaround online. This saves me a lot of time and energy, as does the plethora of packages.
I haven't worked on a large-scale JS back-end myself, but this is the case I've heard others make
Blocking is NOT the same as busy wait.
Still, despite that it seems like there's a big advantage to be had
What's the actual difference between (JS):
let x = await doSomeLongProcess();
console.log("done: " + x);
vs (Python) x = await do_some_long_process()
print("done: " + x)[1] Technically JavaScript's async/await syntax came later, but it's just sugar over Promises which have been around for a much longer time, and those are built atop the event loop, which has been core to the language since day 1
Part of the reason is I am already using node for tooling for the front end.
It is less powerful than say C# for example in multitasking - but for hobby projects that rarely matters.
Typescript makes a big difference.
There is a lot of community support: stackoverflow, npm packages etc. Every SDK has a JS version.
It is fast enough for my needs.
NextJS is another good reason.
Also then sufficiently proficient frontend Devs have an easy in into backend development which has turned out to be a very good thing at 5 different companies I have worked for in the last 4 years.
In addition to that not every backend or service needs much performance. I have written quite a few services that get hit maybe 3 or 4 times a minute at best and Node was great for that. Actually I have yet to work anywhere where performance was limited by the language choice and not by architectural decisions or inconsidered use of databases and data structures. I am not saying this does not exist but it does not mirror my experience with the majority of companies at all.
I'd also say that despite npm and dependency hell being a real problem there is a vast ecosystem of packages out there. I know python has that going for it too. But Elixir is much less developed in that regard - simply by being less popular.
[1] https://trpc.io/
- Synchronous execution + async-everything is a great combo.
- First class Promise abstraction.
- Good general purpose language. Its warts are mostly smoothed over. It's not like Javascript from 20 years ago.
I like writing Javascript. I certainly prefer it over the other popular dynamically typed languages. (I don't see what Ruby or Python offer me over JS as general languages)
Rust and Go make different trade-offs. I would never default to either for general purpose projects. Meanwhile JS is my default for networked code.
I like js too, but both python and ruby are much better languages. It's just that js won distribution, which means it won adoption, which means you have 10MM devs smoothing it's rough edges. Just to take one language feature, consider pythons list and map comprehensions. js has nothing like that - but it also has 10 high quality libraries that do that and more, like lodash. Consider also the ridiculousness around javascript's "OOP" features, like the use of "this", or it's behavior around truthiness, or (arguably) the misfeature of prototypal inheretance - all of which can be forgiven because functions are, after all, first class in javascript, which means you can, with enough effort, fix all the things.
In truth if you want to understand absolutely everything about your runtime, and have some feeling of safety in a sandbox, then the jvm is the best. The vmspec is great, as is the langspec. It's very fast. The tools are mature. Lots of languages are written for it. It's behavior under load is well-understood. Like PHP there is a lot of bad code written for it, which gives it a bad name, but it's still a real gem.
For example, you bring up Python's collection comprehensions, but I could easily point out Python's gimped lambda support and thus poor FP abstractions and the need for a special comprehension abstraction.
I don't think it's worth arguing about. But I had to chime in before someone thinks there really are no objective nor subjective reasons why someone might prefer Javascript. I do.
> then [X] is the best.
Btw, there is no best. There are only trade-offs.
One of my points is that you can't say something is the best. The only thing you can do is enumerate the trade-offs that made sense for you, and much of that is only personal/aesthetic.
You can. And you did. When you say something is your favorite, this is like saying it is the best, all things being equal, in your view. For network connected server processes, I say the jvm is the best runtime. Redbean, interestingly enough, may take that crown, but I'm only now playing with it, but I love its tiny simplicity. In some ways this is like love - do you shy away from saying that your woman is the best? I hope not. And I hope no-one holds your feet to the fire if you do.
Prototypal inheritance isn't a misfeature, it's an interesting and powerful language design choice used by several different languages [1]
It may not be your cup of tea, but having written code in most mainstream languages since the 80's, I can tell you I definitely prefer it to alternatives like class based inheritance.
Runtime mixins are one of the most powerful composable concepts in any language, and this is a breeze with js. Take a look at the hoops c# had to jump through to come up with something similar but less powerful, as an example. Or the nightmare of multiple inheritance in C++.
[1] https://en.m.wikipedia.org/wiki/Prototype-based_programming
Not sure what it is, but I don't like it and won't participate.
(promise abstraction since 2010, async/await since 2012)
- Investors want unicorn returns.
Good luck!
Do you think that investors see every company that isn't a unicorn as "nothing"? I think you're living in a fairytale
Given every big company uses JS, and thus many SaaS VCs have JS in their annual set of thesis bets, it's reasonable that Deno got picked by a top group given their team & growth. Same story with npm, netlify, etc.
I wish the team luck in hitting significant revenue in the next 9-12mo, as that will determine a lot of what happens to the community. A lot of pressure & culture change to work through!
EDIT: the comment I responded to was completely rewritten and replaced with a different one. Please don’t do this
Some people involved might expect more, and I'm sure hope for more, but I'm a language designer & CEO, not a mind reader :)
If Deno reaches 30% of the impact of Node, their company could be worth billions.
In the meantime, we get a better open source runtime because they have money to build it out.
there are lots of companies, which are technically "unicorns", but haven't even got any revenue yet (Rivian and Nikola come to mind)
I love Deno and want it to succeed, but it doesn't feel like a unicorn, and I'm worried about it being expected to become one
There’s no guarantee that the creator of the ecosystem will be one of the unicorns, but they’re as good a bet as any other company to pull it off. VCs aren’t looking for 100% certainty, just a plausible path.
They charge you for CPU and bandwidth more than they pay for it.
Apple's moat, for example, is its institutional knowledge of design and maybe its relationships with its suppliers, e.g., their deal with TSMC to lock up most of TSMC's capacity on the 5-nm node. Another moat Apple has is consumers who do not like engaging in sysadmin battles with their consumer electronics. One of my friends, a 79-year-old woman, for example, told me once that she wouldn't consider buying a computer from any company except Apple. (I could probably induce her to change her mind on that, but it would take persistence and patient explanation on my part, and also I'm probably the only person who could change it.) The main way Apple has maintained (for 38 years!) its dominance in institutional knowledge of design is probably the fact that most of the young talented designers want to work for Apple (partly because most of the people willing to pay extra from good design in consumer electronics buy from Apple).
Google Search's moat seems to be institutional knowledge on how to build a good search engine and access to data on what people search for and which search results they click. Strengthening the latter moat is the reason they're so interesting in having all traffic from the consumer's browser encrypted: namely, so that the consumer's ISP cannot sell data on the consumer's interactions with Google's search engine to any competing search engines. Another moat Google has is that most consumers will not take the trouble to change the default choice of the search engine used when the consumer types a non-URL into the location bar of the browser. Strengthening that moat explains Google's willingness to pay Apple and Mozilla to be the default search engine and Google's interest in giving away Chrome and Android.
Microsoft's moat: practically every organization uses computers and needs employees who know how to use those computers. They mostly choose Windows and Office because that is what most prospective employees know. In turn, when a young person improves his or her attractiveness to prospective employers by learning computer skills, they usually choose to learn Windows and Office because that is what is running on the computers of prospective employers.
The other big moats off the top of my head aren’t as strong but ASML, TSMC (for now), Tencent, Baidu, Yandex, Kakao Daum, are all worthy but still peanuts comparatively. I’m sure some Indian companies too.
But I agree with your point: it is really hard for a new company to create a large revenue stream with a strong moat around it.
(I'd bet this will be, or already is, the more profitable side of the business.)
I like Deno in principle, but I'd love to see how Slack, Github and Netlify are using it.
For some reason it never had that same negative effect on me
https://docs.netlify.com/netlify-labs/experimental-features/...
All this dynamic processing happens in a secure runtime based on Deno directly from the worldwide network edge location closest to each user.
It reminds me of the feeling after surfing when you lie in bed with your eyes closed and still feel the waves going up and down.
Slack: "Run on Slack"
Netlify: "Netlify Edge Functions"
They're both listed in the Showcase: https://deno.land/showcase
Isolates are a really interesting approach to deal with the inherent nature of scripting languages to deal with the lack of threads as most scripting languages are inherently single-thread/single-process. If you have a 2000 line ruby class named 'Dog' you can easily overwrite it with the number 42. This is awesome on one hand, however it makes scaling the vm through the use of threads too difficult as threads will share the heap and then you have to put mutexes on everything removing any performance gain you would have normally gotten. Instead the end-user has to pre-fork a ton of app vms with their own large memory consumption, their own network connections, etc and stick it behind a load balancer which is not ideal to their compiled, statically typed cousins and frankly I just don't see the future allowing these languages as we continuously march towards larger and large core count systems. I'd personally like to see more of the scripting languages adopt this construct as it addresses a really hard problem these types of languages have to deal with and makes scaling them a lot easier. To this note - if you are working on this in any of the scripting languages please let me know because it's something I'd like to help push forward.
Having said that, they should never be considered as a multi-tenant (N customers) isolation 'security' barrier. They are there for scaling not security.
V8 isolates are absolutely designed for security. For 10 years V8 was the only security barrier between sites in Chrome. Now they have retrofitted strict site isolation for defense-in-depth, but that doesn't mean the V8 team suddenly doesn't care about security. Chrome wants both layers to be secure and will pay a bug bounty if you break either one.
Ugh, that's not how big O notation works.
Big-O means given an arbitrary function of some complexity, it is definitely bounded by this other function from the top, i.e. that other function is always larger than our arbitrary function.
f(n) \in O(n^2) means n^2 (ignoring constant factors) is always larger than f(n). If you have no polynomial elements in your O(g), then you only state the constant factor. Like in O(1).
So saying Cold_start(service) \in O(100 ms) is exactly the same as saying the cold start will always be below 100 ms. It makes sense to not say they are all O(1), although strictly they are, as the interesting bit is the difference in magnitude of the constant.
The only reason I didn't continue was a lack of ARM support.
Someone is doing the builds here - been using them and seem ok: https://github.com/LukeChannings/deno-arm64
I want to say I followed these instructions for doing so recently:
https://gist.github.com/plembo/c4920016312f058209f5765cb9a3a...
It's one thing for it to claim supremacy over node, but can it attract the TJ Holowaychuk's of the world and truly generate a full ecosystem.
Something like this? https://twitter.com/dassurma/status/1407048553768402949
Says it all about the state of the JavaScript ecosystem really.
Competition is good.
I was very excited about the idea of workers but their tooling is (or at least was when I tried it last) abysmal, buggy and hard to understand. To this day I don't know how to setup a basic dev vs. production in workers.toml. Local debugging was buggy for naked domains (even found a GitHub issue for it that languished for months with no bugfix or clear explanation / workaround) and very slow.
Great idea killed by poor dev tooling.
Deno deploy is the opposite of that: deploys are instant and it's obvious how to deploy. You can develop and test locally.
Cloudflare released wrangler v2 (which dropped rust for node) and maybe it's better now but the one experience I had with wrangler v2 was trying to deploy a small static website (pages) and it failed due to their backend throwing 50x errors.
So much so that I wrote Denoflare (https://denoflare.dev/) to make writing Cloudflare Workers using standard Deno a breeze: no wrangler, toml, webpack, npm etc required
https://deno.com/deploy/docs/pricing-and-limits https://developers.cloudflare.com/workers/platform/limits/
Here's an example. Deno is like any other backend runtime and has regular DB clients. CF Workers do not. If you want to use Workers with PG, the CF docs point you to Supabase which provides REST over PG using PostgREST.
https://developers.cloudflare.com/workers/tutorials/postgres...
Deno Deploy doesn't have much of a moat, and Cloudflare is better funded. Both are promising to be open source & self hostable (https://twitter.com/KentonVarda/status/1523666343412654081). We shall see.
Even when CF open sources Workers, they will be useless for anything non-HTTP related.
> Deno deploy seems cool and all, but I haven't seen any great rationale for using their service over say Cloudflare Workers.
Note "their service". You replied with
> Workers are not meant as a generalist runtime.
So, we really were talking about Cloudflare Workers vs Deno Deploy.
Deno is something different, for sure. But it seems Deno Land Inc. is betting on Deno Deploy. Which makes grandparents' question interesting.
What I'm saying is that, even if you're only going to use Deno Deploy, it is an objectively better proposition because Deno (the runtime) has a much broader use case.
Would you rather use something that (for now) can only be used on a single cloud provider for (let's call them) "edge HTTP" workloads and integrations with services of that single cloud provider...
... or use something that can be used on any cloud/hosting provider, for any HTTP workload (plus many other non-HTTP use cases), which also happens to have an "edge HTTP" service custom tailored for it?
And let's not forget, Deno (the company), is much more focused on real developer needs. Workers still have a mediocre DX (although it has improved considerably lately) and still no framework for Workers like Fresh.
I think ~100 ~1000 ~10000 would be clearer than using the big O notation, since this has nothing to do with fuinctions.
Indeed, especially when you compare with a company such as Supabase (which is working on way less interesting technology imho) who just raised $80M: https://news.ycombinator.com/item?id=31328783
That aside, I have been very productive with Deno. Web Standards are going in the right direction, and Deno helps using them easy. The Request/Response model with streams make a lot of sense, and provides lots of way to optimize.
I understand performance is not the best compared to Elixir or Rust, but the ability to quickly download Deno, run a web server, import modules through URL, and start hacking and testing, then bundle into a cross-platform executable is a life-saver. No installation step, no build tool in between.
And if I want to write a web server, well, time to find out what the trendy web server these days, and which router to use.
Whereas I can just create a main.ts file, `deno run/test -A --watch main.ts` and start importing the server from std.
Yes, you can do pretty much anything in anything, but for me, Deno lets me start up faster.
Oh, and we're not getting to the cross-platform build yet.
So less than 17 minutes of CPU time per day - not a lot, but also not nothing.. But at 10ms per request, what would one use it for? Just server-side rendering for something simple?
I've had to switch multiple webapps to Cloudflare Workers' "unbound" mode to go beyond CPU time limits.
Seriously my biggest pet peeve with both deno and node.js. In every other REPL I've used this is basic functionality. When I talk about this to JS people they look at me like I'm from mars.
Most repls use a special in repl keyword to accomplish this.
For some reason the JS community can't move past "but modules are special". Ocaml has modules too and the repl can reload stuff from a file no problem.
Just wondering that, since Deno is rewriting all of npm anyway, it would have been a great time to revisit some of these historical script-y design decisions, to make JavaScript/TypeScript-at-scale suck less.
Granted, probably too late now, but as-is neither of Deno's url-based imports or sandboxed-by-default changes has seemed worth the migration cost.
But, if they also made something like "everything hot reloads for free" level ergonomic/platform changes, then yeah, I'd be hopping over.
You want to sell Javascript based solutions, go for it. But don’t push this nonsense like “No language like Javascript”. The only reason Javascript has a wider adoption than others is because it’s forced upon us. Browsers understand just Javascript to display web pages, period. Doesn’t make it the best because of that reason. I say this as an experienced IT consultant managing a wide array of projects over my career across industries.
You know what usually bites me when I touch code that has not been touched for 6 months (usually a late contract renewal)? It’s not my Elixir or Ruby code that’s running on autopilot. It’s the stupid Javascript with its Node based dependencies all failing randomly in each direction just because some developer used a library for something trivial they could have written themselves or super likely because Babel or Webpack decided to change their config files so my entire JS pipeline breaks. JS is a language full of patchwork and its entire ecosystem, more so - it certainly has gotten better over the years. If it works for you, then great. But it’s a far cry from a “one solution for everything that’s better than everything else”.
Personally, I use Coffeescript. It has been a breeze from all aspects.
It is forced upon us doesn't mean it can't be universal. On the contrary, it usually is. It's like how USD is kinda forced around the world but it's universal nonetheless.
This is a strawman. Where in the original post did they say JavaScript was the best. They said JavaScript is the "universal" scripting language in the sense that is ubiquitous. That is fact. You literally confirmed it here:
> Javascript has a wider adoption than others is because it’s forced upon us
> You know what usually bites me when I touch code that has not been touched for 6 months (usually a late contract renewal)?... It’s the stupid Javascript with its Node based dependencies all failing randomly in each direction just because some developer used a library for something trivial they could have written themselves or super likely because Babel or Webpack decided to change their config files so my entire JS pipeline breaks.
Okay....? Then write VanillaJS instead of depending on Node dependencies. It's not JavaScript's fault that you're a contractor dealing with other developers' app-level tech debt.
> Personally, I use Coffeescript. It has been a breeze from all aspects.
That's a cool story, but Deno uses TypeScript so the whole JavaScript rant crumbles here.
> Browsers understand just Javascript to display web pages, period.
Bits like this make me feel like you're just throwing a bunch of domain-related words together and hopes something sticks.
Browsers understand more than JavaScript, and JavaScript isn't the control layer for logic, which can including displaying page, but ultimately its HTML that is for displaying the web page.
> I say this as an experienced IT consultant managing a wide array of projects over my career across industries.
I say this as an experience software engineer deploying a wide array of web apps getting hundreds of millions of views a month over my career across FANG companies.
> Okay....? Then write VanillaJS instead of depending on Node dependencies. It's not JavaScript's fault that you're a contractor dealing with other developers' app-level tech debt.
That’s a strawman. I challenge you to write a full on production level frontend application using pure Vanilla JS. You can’t. Not in 2022…unless it’s a simple DOM manipulation job.
> That's a cool story, but Deno uses TypeScript so the whole JavaScript rant crumbles here
“Bits like this make me feel like you're just throwing a bunch of domain-related words together and hopes something sticks.” See how easy it is to resort to ad-hominem?
So what you’ve worked across FANG companies? It’s irrelevant to the discussion. No need to show off - saying you’re an experienced software engineer is good enough. The rest of it doesn’t make your argument any more valid.
Javascript apologists like you who don’t see the problem with the ecosystem are the reason why the whole ecosystem is so fucked up with half baked systems that are barely reliable.
This bit is unnecessary. We don’t need a bunch of e-penis measuring. I personally see less credibility when social proof is used this much.
I won’t build on anything that isn’t permissively licensed. They can’t charge for anything without license protection.
so I think in their notaion O(10) has greater magnitude than (>) O(1)
Which is to say, they're saying Deno has a cold start time of ~100 ms, package size ~10M, a physical machine can support ~1k instances.
- why is the CPU time limit so low? 10ms (or even 50ms in Pro version) seems a limit very easy to blow for any sufficiently complex app
- why is there no data storage offering available? I'm not sure I see the point of edge deploys while data is still only accessible through a centralized database server. Having a way to deploy a sqlite database next to the running app seems like an easy way to realize the gains of edge deployments.
I'm currently trying Fly.io which seems to cover both of these issues, but I wonder if I'm missing something here - or perhaps this service is intended for very different use cases.
It's strange this isn't more explicit.
The biggest barrier is the library ecosystem. JS's insane packaging history means a lot of NPM libraries don't work seamlessly with Deno even if they don't use Node APIs.
Or, in simpler terms, O(x) = “approximately x, to one significant figure”
It's misusing big-O notation for "order of magnitude", but after I initially tripped over it, it seemed clear enough.
WTF? How is that even slightly true?
C is the universal scripting language, in exactly the same way.
Nothing happening in this space makes any sense to me.
That said, I have tons of little one-off utilities I launch with "go run random-thing.go" because I don't care about the second or two it takes to compile, and if C were my everyday language I'm sure I'd have a compile-and-run wrapper handy. At that point, it's effectively a scripting language, right?
My rule of: The more HN criticizes it, the more likely it succeeded, still rings true.
WASM will eventually spell the end of JavaScript’s hegemony as it becomes easier to build web apps in other languages. So good luck Deno. You’re betting on a sinking ship.
You might drop into a C++ codebase from 1990 that looks more like C (it was made to be mostly backwards compatible after all), then see a codebase from 1999 that's chock full of the most cryptic template metaprogramming imagingable and complete spaghetti structure of OO "design patterns", and then see a codebase from 2010 making much more heavy use of the updated standard library and a functional style of programming.
The sheer scope of C++ as a language is frightening as it requires quite deep knowledge of the parts you're using. Sometimes even deep knowledge of the history and rationale for parts of the language you're using existing. And if you screw something up you might silently introduce a major security hole, OS crash, or worse--the language gives you a ton of rope to hang yourself from.
Oh and there's no standard build system, no standard package manager, no standard project layout, no standard for code formatting, documentation, etc. Everyone has their own bespoke solutions that make the JS world look amazing in contrast.
Also loving .deno.dev as a fairly nice top level domain for a blog. E.g. johnsmith.deno.dev.
Who validated this idea and with what measures?
Not being pessimistic about this though. Imho Deno seems like a solid improvement over nodejs.
no matter how much I think about that whole concept, I see no application for it that couldn't be done better, faster and easier with regular tools
Yeah, thousands I would imagine. The last two companies I have worked at have been 100% serverless or nearly 100%.
> no matter how much I think about that whole concept, I see no application for it that couldn't be done better, faster and easier with regular tools
Considering you have to ask if there are _any_ products running in a serverless environment, I would imagine you need more exposure to the concept before you make such a large judgement on it.
If you can answer (for legal or other reasons you might not be able to): What kind of monthly bills did your setup have and how many req/s did you serve (in lack of a better metric)? It'd also be useful to know average min/max response time if that's something you remember.
I wish that was a good way of evaluating "performance / price" but that's really hard... If someone know a better way to frame the question regarding price, it would be very helpful.
There is more than "raw dollar amount on monthly bill" to account for in cost, as well. For one, there's stability and the toll that takes on both your team and your customers. Not saying non-serverless apps are not stable by nature, but I've now been part of two teams that have seen the same types of benefits and those benefits line up with the "sales pitch" benefits.
I rather know my configuration and use one big server with the static files on a CDN
https://blog.khanacademy.org/the-original-serverless-archite...
For example, you have some background tasks (sending email, processing files, etc). It's very convenient to just push those into a queue and have serverless functions chew through them. They scale to zero, cold start time has no negative impact on the workload, you don't have to worry about k8s resource requests and scaling, etc.
I too am skeptical of using any serverless offering for serving HTTP API's or server-side rendered pages, atleast for non-trivial amounts of traffic. CloudRun can do it but only because it's a thin management layer on k8s/knative and even then networking config for anything other than CloudSQL is tedious (you have to deploy a proxy to access your VPC).
Netlify is using Deploy