Live data from Hacker News

Deno Cron

deno.com

81–90 of 190 posts

Re: Deno Cron

#81
post #49

Earlier quoted context omitted.

> 1. Services like this cron with Dyno Deploy or Vercel where the cloud things are abstracted away for you. I agree with the sentiment, but to me it’s a shame this even qualifies as abstraction in the first place. Periodic execution of a function is extremely basic and already exists in almost every programming environment. If this needs to be a service (instead of a library call), there is something deeply wrong els…

I wonder why more people don't just set up a cheap VM and run this sort of thing via crontab.

Because managing servers adds a lot of tech overhead (OS and security updates/access control/disk/HA/monitoring) + provisioning/config + deployment.

That said, there will be a time when your SaaS costs more than managing infra.

Re: Deno Cron

#82
post #74

Earlier quoted context omitted.

I wonder why more people don't just set up a cheap VM and run this sort of thing via crontab.

The same reason why most people stopped manually editing some random files via FTP to do deployments: to get a proper reproducible, automated and monitored production environment.

Cloud setups are not reproducible, because you cannot reproduce the same env locally or in the other cloud.

Re: Deno Cron

#83
post #39

> How exactly does Deno Deploy know there’s a cron in your code, even when there’s no web server handling requests? > When a new production deployment of your project is created, an ephemeral V8 isolate is used to evaluate your project’s top-level scope and to discover any Deno.cron definitions. A global cron scheduler is then updated with your project’s latest cron definitions, which includes updates to your existin…

Where better to put cron work? In another repo? If the cron jobs are 100% unrelated to the codebase, yeah, it might be weird. If the jobs are "run the foo() method every 2am"... having that info colocated with the foo() method itself makes a lot of sense, imo.

You can put ordinary crontab into your repo.

Re: Deno Cron

#84

Nice, I was just wondering if there was an opportunity for a product similar to vercel for batch jobs. This isn't quite that but close. From my experience there 5 main components for larger scale system. - Request server - database - queue - background worker - offline batch jobs I feel like so far serverless has the first 3 fairly well developed but the last two are still underdeveloped. But maybe I'm just not aware…

That's exactly what windmill.dev is (https://windmill.dev)

Re: Deno Cron

#86
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.

It does not matter if you are "well rounded". If you can schedule something with a line of code then that is objectively faster to develop and maintain than to (for GCP for example):

- setup cloud cron job

- setup pubsub channel

- create pubsub subscription

- add environment variables specifying the subscription

- make all that work in terraform and run migrations

And that process is different for every cloud provider.

Re: Deno Cron

#87
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 know that displaying artwork is not the point of the article, but please, at least make it believable when you look at it for more than one second.

Re: Deno Cron

#88
post #72

Earlier quoted context omitted.

Or you could just use an actual host running actual cron. No clicking, no terraform, just crontab -e. The last thing small short-staffed startups with no infra people should be doing is messing around setting up cloud infra to run something on a schedule.

Okay, but who's taking care of the actual host? I know this is HN and we're all server admin wizards, but there is some effort and maintenance required. This is theoretically even easier than that. Yay for a spectrum of options!

That's an overblown problem, especially for a small business which is not going to have the infra problem of someone with scale problems.

We've just been sold lies that pushed us to buy expensive clouds - and are not that much simpler than good old tools

Re: Deno Cron

#89

Nice, I was just wondering if there was an opportunity for a product similar to vercel for batch jobs. This isn't quite that but close. From my experience there 5 main components for larger scale system. - Request server - database - queue - background worker - offline batch jobs I feel like so far serverless has the first 3 fairly well developed but the last two are still underdeveloped. But maybe I'm just not aware…

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 their code?

Re: Deno Cron

#90
post #46

Earlier quoted context omitted.

Yes, we're anticipating more spiky workloads because of this. Deno Deploy is already designed to handle spikes, but we also have a few additional mitigations in place for Cron. For example, we will limit concurrent dispatches for the same project/user/organization, which may slightly delay the execution of specific cron tasks.

Charge 25% more for every 0 in the scheduling expression, problem solved :-)

Or add a default randomness factor that makes it run within a certain time (like 60s or 5m) of the target, perhaps with an additional charge to run at the exact time if people have that requirement.
Post reply on HN