Live data from Hacker News

Deno Cron

deno.com

181–190 of 190 posts

Re: Deno Cron

#181
post #43
post #37

I am a lead on a small startup team and one of the biggest pain points is dealing with infrastructure. We have no dedicated devops person and much of that work falls on me and other people who would be better writing code. I think the cloud paradigm is experiencing a shift. Few of us want to deal with cloud infrastructure (whether clicking around or via Terraform or equivalent) to execute a function every X minutes -…

It is really disappointing to me when I hear takes like this. As an industry we are splitting the roles of programmers and engineers so that programmers can just throw spaghetti at the wall and it is the engineers problem to happily run it. We need more well rounded people that also fundamentally understand how their code is executing on the backend so performance and cost can be optimized.

This is a very different thing. Deno deploy have identified a few commonly used tools and implemented them as (IMO) very leakless abstractions. Why hire a team of engineers to implement a worse abstraction layer for you?

Performance (in particular cold start time) is better than most other similar cloud faas products. Dev ergonomics also.

If you need something more, sure go ahead and use another tool. But very many use cases will be well served by deploy in its current state.

Re: Deno Cron

#182
post #148

Earlier quoted context omitted.

This is something I like about in Laravel: $schedule->call(new DeleteRecentUsers)->daily(); $schedule->job(new Heartbeat)->everyFiveMinutes(); $schedule->exec('node /home/forge/script.js')->lastDayOfMonth('15:00'); $schedule->command('foo') ->weekdays() ->hourly() ->timezone('America/Chicago') ->between('8:00', '17:00'); $schedule->command('emails:send') ->hourly() ->days([Schedule::SUNDAY, Schedule::WEDNESDAY]); htt…

As someone who has not seen this syntax before, it's OK. But, "timezone" shouldn't be a separate method, it should be a parameter to the function taking the time specification. Functions named as nouns should be named "onNoun" instead (onWeekdays, onDays). It's also very unclear what happens if I do something like ->daily()->weekdays() ("daily on weekdays") or ->weekdays()->lastDayOfMonth('15:00') ("on the last weekd…

While I agree with most if not all your points. Let's agree that "should" is a strong word for what is basically our opinion. These are all debatable.

For example:

- Prefixing everything with "on" adds noise. It's debatably intuitive enough as it is.

- Demanding timezone arguments on these methods also adds noise. More often than not you just want to use system default noise since it is such an important thing that you want to control at a higher level anyway.

- It can be okay to allow edge/confusing states if the tradeoff is to keep implementation simpler. One can always rely on unit tests to keep expectations in check.

Re: Deno Cron

#183

Earlier quoted context omitted.

I love Deno, and it is because it usually avoids these kind of footgun situations. It is hard to grok that you can access those variables in the shared scope, but if you manipulate them, they are actually in completely different isolates. I understand architecturally why it is that way right now though. I just wish there it was more obvious that you are really inheriting a fresh state somehow. Maybe only `const` shou…

Is this really that surprising of a behavior, though? PHP apps threw away state after each request, and in the Node.js world data doesn't persist across server restarts or across instances of the app. The only way I could see someone being confused about this is if they thought Deno Deploy was just a single VM running a single instance their code.

It is surprising behavior, because if the code can be accessed inside the scope, it is safe to assume that any modification to it will change the state, since it is still inside closure. If they throw `s++` with accessing undefined variable error, it will be much better. It'll be better if they can catch it during compile / validating / linting level.

And yes, PHP's behavior is surprising too. Unless we're doing scratch PHP without any classes or frameworks, any temporary variables become non-intuitive.

Re: Deno Cron

#184

I like a lot of what Deno does, but I'm having some trouble understanding why this (along with Deno's KV and Queues offering) is part of the Deno runtime. The blog post touts this as a feature to reduce the amount of code to get up and running, but a library would accomplish the same thing. A first-party library could even directly integrate with Deno Deploy in the same way that this appears to. Why pollute the runti…

I think Ryan Dahl (creator of Deno and Node before that) is trying to make it stand out from Node which has a very small standard library. So they are including common things that used to be in many separate modules.

Re: Deno Cron

#185
post #170

Earlier quoted context omitted.

>Why pollute the runtime with something unrelated? Because money. They are venture funded and need to show some kind of path to profitability.

People acting like Bun, which is also ventured funded, isn't going to be doing a lot of similar things once they stabilize their runtime. Node had a lot of runway in the era/climate it was made in.

I also get the sense that Dahl ended up feeling slighted about his loss of control (see: ability to extract rent) of the Node ecosystem, and doesn't want to let that happen again. It feels almost quaint how open things were back then.

Re: Deno Cron

#186

The AI-generated imagery at https://deno.com/blog/cron/cover.png is actually painful the longer you look at it. The multiple watch hands might be an artistic effect, but the clock lacks the tenth hour and has two elevenths, the dinosaur's legs make absolutely no sense, and the water reflections show a different pattern on the dinosaur legs and a completely different set of clock hands than what is visible above. I kn…

Yes, by all means, make sure that the dinosaur wearing a clock around his neck looks believable. I'd hate to see something ridiculous.

I'll take this bait :) why do dinosaurs that can read and create clocks have two elevens on the clock face (instead of one ten and one eleven)?

Re: Deno Cron

#187

I want to love Deno. It seems to really modernize TypeScript development. I just haven't had good experiences with it. I spent a day or two migrating a TypeScript project [-1] over to Deno from NodeJS. Here's what I had to do: * Change all of my local imports to something that would work with Deno. That meant appending `.ts` or `index.ts` for folders, except in some cases where Deno requires `.js` * Modify my monorep…

Thank you for the detailed feedback. Deno 1.38.4 was just released with a partial fix for the VSCode issue you mentioned. We're fixing the twisted issue too.

https://github.com/denoland/deno/issues/21389 https://github.com/denoland/vscode_deno/issues/895

other fixes are being discussed.

Re: Deno Cron

#188

Earlier quoted context omitted.

This is really interesting - we’ve tried really hard to solve some of these with Bacalhau[1] - a much simpler distributed compute platform. Would love your feedback! [1] https://github.com/bacalhau-project/bacalhau Disclosure: I confounded Bacalhau

Huh, this is pretty cool. I took a quick look through the docs and from what I understand you can just submit docker containers to be run on a cluster. The default one is a public cluster. In some way it seems similar to Google Borg. What I don't understand though is do you have to pay? Who provides the compute? Maybe possible to build a vercel type service on top of the private cluster where people can just submit t…

Thanks! The idea is that it’s up to you - we offer a demo network, and there are ISPs who are interested in doing this privately, but the default is to allow you to trivially setup your own cluster (much easier and more maintainable than many cluster providers today - no hate! Just different)

Re: Deno Cron

#190
post #170

Earlier quoted context omitted.

People acting like Bun, which is also ventured funded, isn't going to be doing a lot of similar things once they stabilize their runtime. Node had a lot of runway in the era/climate it was made in.

I also get the sense that Dahl ended up feeling slighted about his loss of control (see: ability to extract rent) of the Node ecosystem, and doesn't want to let that happen again. It feels almost quaint how open things were back then.

Interesting, didn't know that was a background intention
Post reply on HN