I love working with JS/TS (front, back, tooling), but find Node more and more annoying (especially bothered with packaging a release for production, lately). So naturally I tried Deno lately. Some things mentioned in other comments were really nice, but the lack of retrofit with the Node ecosystem is a shame. So many years and efforts and community growth are sitting right next door only to be ignored... I can't unde…
Deno 1.20
21–30 of 60 posts
Re: Deno 1.20
#22What is the reality of Deno now? I remember when Deno was being developed it was promoted like how Web3 is being promoted right now. But browsing through hundreds of job posts I have not seen anyone having Deno as a requirement. Everyone wants Typescript+Node and that's about it. Size of community, enterprise use and approachability as the first framework to learn. I think these 3 factors determine the success of any…
Re: Deno 1.20
#23Has anyone tried switching from Node to Deno in an existing project? I'm personally very interested in Deno but it's hard to find a greenfield project to try it out and writing toy programs is not giving me enough insights of how much better/faster Deno is.
I'm an existing typescript user but I just can't see a reason to use Deno. Depending on the NPM repository CDN is less worrisome than depending n different CDNs. Including all my dependencies unilaterally (aka deps.ts) seems like a patch upon a bad decision. Making the server side runtime environment pretend to be or adopt aspects of the web browser client environment seems like a misguided direction in my wisdom, be…
This is a really strange take. Deno isn't significantly easier to work with than Node, so it shouldn't matter much for a React code camp graduate which of those two to ride into full stack.
Deno is more appealing to seasoned web developers, who appreciate its conformity to modern web standards, the absence of Node quirks, and a better security.
Example: discussion of Deno by two Google developer relations engineers: https://www.youtube.com/watch?v=SYkzk_j3yb0
Re: Deno 1.20
#24What is the reality of Deno now? I remember when Deno was being developed it was promoted like how Web3 is being promoted right now. But browsing through hundreds of job posts I have not seen anyone having Deno as a requirement. Everyone wants Typescript+Node and that's about it. Size of community, enterprise use and approachability as the first framework to learn. I think these 3 factors determine the success of any…
Copy cat culture will do the rest.
Re: Deno 1.20
#25Looks promising and I find the Deno project very exciting! What is the recommended way of running Deno in production on a multi core machine? In node there is the cluster module that allows one process to run a cpu intensive task while the other processes to continue answering web requests. This is good for stuff like excel exports as an example on larger datasets. Obviously you could run some kind of cronjob in the…
However, afaik, things like sockets can't be passed through (something node can do iirc). There is a mechanism for this in the web workers spec; Transerables, that's part of the web API spec and is used to allow passing things like a large ArrayBuffer from one worker to another without needing to copy it by removing access from the sender and giving it to the receiver.
So you would have to plumb the socket into postMessage for a worker, or, for the excel example, make use of promises/async+await to spin up a worker, feed through the min. data needed to kick off the export, let it process in the worker and then send the response back to the main thread.
Re: Deno 1.20
#26Looks promising and I find the Deno project very exciting! What is the recommended way of running Deno in production on a multi core machine? In node there is the cluster module that allows one process to run a cpu intensive task while the other processes to continue answering web requests. This is good for stuff like excel exports as an example on larger datasets. Obviously you could run some kind of cronjob in the…
Re: Deno 1.20
#27Has anyone tried switching from Node to Deno in an existing project? I'm personally very interested in Deno but it's hard to find a greenfield project to try it out and writing toy programs is not giving me enough insights of how much better/faster Deno is.
Re: Deno 1.20
#28Re: Deno 1.20
#29Earlier quoted context omitted.
I'm an existing typescript user but I just can't see a reason to use Deno. Depending on the NPM repository CDN is less worrisome than depending n different CDNs. Including all my dependencies unilaterally (aka deps.ts) seems like a patch upon a bad decision. Making the server side runtime environment pretend to be or adopt aspects of the web browser client environment seems like a misguided direction in my wisdom, be…
> I sense that Deno is primarily being pushed by developers who cut their teeth in React-based code camps who are looking for (understandably) a wave to ride into "full stack" software development. This is a really strange take. Deno isn't significantly easier to work with than Node, so it shouldn't matter much for a React code camp graduate which of those two to ride into full stack. Deno is more appealing to season…
No, this is the gatekeeping mentality of many people software development.
It's also wrong, since Deno removes many idiosyncrasies about server-side JavaScript.
Re: Deno 1.20
#30Looks promising and I find the Deno project very exciting! What is the recommended way of running Deno in production on a multi core machine? In node there is the cluster module that allows one process to run a cpu intensive task while the other processes to continue answering web requests. This is good for stuff like excel exports as an example on larger datasets. Obviously you could run some kind of cronjob in the…
Deno does expose the "Web Workers" standard as a way to utilize multiple cores, where communication between them is handled by postMessage(...). However, afaik, things like sockets can't be passed through (something node can do iirc). There is a mechanism for this in the web workers spec; Transerables, that's part of the web API spec and is used to allow passing things like a large ArrayBuffer from one worker to anot…
If I use a web worker it will be for one specific thing and that thing only, not for the entire web request? Thus, if there is anything slowing down the request in form of CPU intensity, it will "kill" the application at least until the cpu intensive request completes.
Sometimes it's hard to know beforehand what users do for example and surprising things can happen. I have had the same issues with Meteor for example where users killed the app because they tried to upload something unexpected that crashed the app and them spamming the upload button kept it crashing after restarts. It was of course an error from my part but it could be avoided if Meteor did support the cluster module. I have also had the exact same issue when unexpected large datasets occurred by user input (not file uploads), the app got so slow it stopped answering requests from other sources. It was after that I discovered that pm2 can run any node app in a clustered mode, which was very nice.
But with that experience in my baggage, it am very hesitant to use Deno because of this reason. I can't host my app on a serverless platform because reasons and I am not sure I even want to even if I could.