Show HN: Jiter – Just in Time Webhooks
jiter.dev
jiter.dev
Instead of setting up cronjobs on a machine I own, this allows me to set up a cronjob on jiter servers to make a callback to my server?
Who is your target user? I am happy to run cronjobs or systemd timers on servers that I or my team control. And for execution in environments like GitHub Actions or AWS Lambda, they all have functionality to trigger execution with a timer.
This introduces added complexity of maintaining a webhook receiver and having to deal with the rather complex failure modes of webhooks.
> And for execution in environments like GitHub Actions or AWS Lambda, they all have functionality to trigger execution with a timer.
We use it for triggering things dynamically within services. For example, when someone books a flight we need to send a follow-up email X amount of time later. Building a scheduler into the service that handles booking the flight might make sense, but what happens when we need to do the same thing for someone booking a hotel or car rental? Instead we just have a service that stores all of the messages it needs to send in the future and has a tight reconciliation loop to send out those webhooks.
> This introduces added complexity of maintaining a webhook receiver and having to deal with the rather complex failure modes of webhooks.
If you only need to do it once, sure. If you standardize the behavior/API then it reduces complexity a ton.
Awesome feedback and thanks for taking the time to challenge us! Sorry in advance for the wall of text, but you asked some great questions.
It sounds like you’re probably a bit outside our target market because you sound comfortable building a scalable solution of your own. However, our target user is either unwilling to build their own or they don’t have the skillset to efficiently build and maintain a separate cron app/server.
As for other execution environments, those definitely have options for scheduling things and setting up recurring events, but you have limited flexibility and things like Type Safety can be quite the burden because they're disparate from your core app. (And while I totally agree GitHub Actions is an option, that doesn't sound fun at all haha). However, what they don't have is flexibility around the "when"...
For example, let's say you want to check to see if a user has performed XYZ action within their first 72 hours after signup. You could setup a cron job to fire once daily to simply poll ALL new users, lock those rows, and join with other tables to see if they're relevant for a follow-up email OR you could setup a Jiter event to target that specific user at exactly 72 hours after their signup. The result is distributed, small queries delivered just in time. The payload contains exactly the information you need to handle that one action and you spread your DB queries out over time to minimize larger impact to a decent chunk of your table.
I agree about the complexity of maintaining the webhook, but hopefully that logic is super focused and ideally you'd use different routes/handlers for different events so each is small and maintainable.
Great feedback all around and I'm curious to see if you have a follow up on any of that!
TL;DR - We're not for everyone, but we think we offer a convenient solution for those looking for flexibility and for those without the skillset to roll their own.
It would be useful to see on your website what the webhook request from Jiter.dev would look like. How does the receiver know that the webhook came from Jiter with no tampering by a middleman? Is there a signature that the user could verify? (Slack does this well on their webhooks.)
Congratulations on the launch, and I wish you the best!
And another great question! We use signing secrets to create a signature so you can validate that the request from us is authentic.
And thanks! This is just the beginning for us, so hopefully you give us a chance and sign up so we can notify you as we release new features!
When it comes back in, they can decrypt and authenticate it. You could hide all this in your api client.
Then you don’t end up with a big centralized database full of the PII of millions of your customers’ customers.
I do like the idea of including a little chunk in our SDK (Coming soon!) to allow them to easily encrypt/decrypt their payload, but that'd be entirely on them to follow that practice.
Do you have any advice or suggestions for how to enforce that?
I'll definitely add some docs to encourage it though; thanks for the suggestion!
You can provide some functions for the webhooks so targeted to authenticate and decrypt the stuff posted to them.
Indie/solo devs, if that express state of things better, who are assured their product will be never run in internal/isolated networking, for example or never need to stop some specific cron but not all of them during migration, blah blah blah.
Please let us know if you have any questions or feedback! We will have an SDK up soon!
For example, if you receive an event to your webhook and you want that webhook to fire again at the same time tomorrow, make a new call to Jiter and create a new event when you receive the first event and you can chain them together. Hopefully by end of day today we'll be able to include the original scheduledTime in the webhook body so you can use that as the base for the new event (e.g., createNewEvent(body.scheduledTime + twentyFourHours)
And as Jose said, we definitely plan to make recurring events possible in the immediate future too!
Thanks for the feedback/interest!!!
Hmm, that feels like a brittle solution. As soon as one webhook delivery fails, or the webhook receiver has a temporary problem and throws an error, the chain of callbacks is cut. And so the user has to monitor that. It also gets messy if the user needs a more complex schedule than "every x <time units>".
All that being said, we definitely want to support true cron expressions at some point in the near future, I was mostly just throwing that out there as an option that would work today.
If you're interested in using it, join our Discord and we'll do everything we can to make the platform work for your use case!
Btw, if you are ever tired with managing your own webhook infra, we[1] do webhook sending as a service, and we have also open-sourced the core tech[2] in case you find it useful.
Hopefully you won't ever have to write them again because we're falling on the sword for you.
Care to share some of the technical details?
How far does it scale, what are the delivery guarantees, recovery strategy for missed webhooks, time accuracy?
Regarding the backend we're essentially adding events into a queue and polling the queue for messages that are ready. Since this is an MVP we don't have any scaling or delivery guarantees but from our testing all of our events were delivered within 2 seconds of the desired time. We have many retries if something fails on our end while attempting to send the event to you, but if your server returns an error to us we will mark it as failed with a timestamp.
We are literally adding retries & some more customizability options right now, as well as better docs for usage and other endpoints!
* Is the future webhook calling cancel-able?
* If I send multiple event with the same payload and same triggering time, will jiter coalesce them into one webhook calling?
* if my service is temporarily offline, will jiter retry the webhook?
* Not yet, but soon! We're planning to add functionality to allow you to specify whether
* Soon, yes. We're planning on adding functionality for retries soon!
Some other similar tech for those interested in tools like this:
Zeplo https://www.zeplo.io/
Boomerang https://onassar.github.io/experiments/boomerang-webhooks
Instead of having EventBridge trigger a lambda to poll your DB every hour for users that signed up 24 hours ago to send them a welcome email, when that user is created you can send us that event with that users info and the emailTemplateId so you can be reminded of it in 24 hours. Once you receive the event from us, you'd send the email like normal on your app server. You don't have to manage the polling infrastructure.
So rad! I built an experiment a while back to do exactly this (https://onassar.github.io/experiments/boomerang-webhooks)
It's awesome to see this productized. I had the same annoyance: setting up and managing cron jobs.
Good luck with the launch :)
We'll be right back... We're hard at work making some great changes.
Thanks for the heads up, we'll get that fixed up asap!
Is that the expected URL?
Worst case scenario (if you're still willing to give us a shot), join our Discord and we can work with you to figure out what's going on: https://discord.gg/NPC6GBDBXp