Live data from Hacker News

Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js

news.ycombinator.com

81–90 of 114 posts

Re: Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js

#82

Is it comparable to sidekiq or a more complex orchestration framework like temporal?

It is actually comparable to both.

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

#83
post #62

How 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.).

This is fantastic! I was hoping it would "just work" and seems like it does! Unless I missed it I think the docs should explain this. It would definitely be a selling point for me compared with having to run a local server like with Temporal.

Re: Launch HN: Defer (YC W23) – Zero-infrastructure background jobs for Node.js

#88
I 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 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

#90

I 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…

1. Yes, we currently provide a simple approach to retries but are already working on providing features for idempotency.

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.

Post reply on HN