Very useful, We are using Defer to run our background tasks
Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
81–90 of 114 posts
Re: Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
#82Is it comparable to sidekiq or a more complex orchestration framework like temporal?
We aim to provide a similar feature set as Sidekiq (throttling, unique jobs) but with a complete hosted solution.
While Defer and Temporal can both be used for writing background jobs, workflows, and CRONs, there are some core design differences.
Temporal has been created as the Kubernetes of highly distributed systems, enabling developers to write code that runs on multiple regions without worrying about possible termination of the program and interruption of workflows spanning across multiple steps.
While Temporal can be used for background jobs, workflows, and CRONs, its main goal is to ensure that highly distributed tasks will reliably be executed. That's the main reason why Temporal API is so verbose, with many concepts to deal with.
Defer, on the other hand, provides comparable reliability while focusing on the developer experience.
You can write workflows, CRONs, and jobs that run for hours without worrying about them being terminated.
All this, with a simple API that enables you to write some workflows (background functions calling other background functions) in plain TypeScript, with no mental model to fit in.
Re: Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
#83How do I test my jobs? Is there a local runtime a-la miniflare? Or do I have to deploy and then run my unit tests against your APIs?
Locally (without `DEFER_TOKEN` environment variable), your functions run synchronously, but apart from this, you get the same API behavior (arguments serialization, execution id, etc.).
Re: Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
#84Re: Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
#85Really nice API design! Also love the way you're handling workflow jobs, super intuitive. Definitely going to try this out!
Re: Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
#86Re: Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
#87Re: Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
#881. Does the retry function work based on the logic that the same input will always return the same output, even if the code uses non-deterministic methods like "new Date()" or "Math.random"? If not, your retry logic may produce unpredictable results and therefore not be safe.
2. According to the article "How Defer Works" (https://docs.defer.run/platform/how-defer-works/), you will be running our code on your platform. How do you ensure the protection of sensitive data during the execution process? For example, how will you prevent access tokens or user/password information for the database from showing up in logs due to exceptions or bad configurations?
Re: Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
#89Re: Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js
#90I have two questions 1. Does the retry function work based on the logic that the same input will always return the same output, even if the code uses non-deterministic methods like "new Date()" or "Math.random"? If not, your retry logic may produce unpredictable results and therefore not be safe. 2. According to the article "How Defer Works" ( https://docs.defer.run/platform/how-defer-works/ ), you will be running ou…
2. All sensitive data (tokens, env vars) are encrypted on our side, however, we don't prevent users to print their values in the logs yet - it's planned in our next releases.