Notify me when you finish your job


Introduction (The Problem) ⚠️:
I was browsing one of those websites that generate AI videos from a prompt, feeling excited and having high expectations—expectations in every aspect. But hold on, we're not here to talk about the accuracy of the result.
Because quite frankly, I didn’t even get to the stage where I could see the model's result in the first place.
What happened is: I typed the prompt, hit "generate," and waited… one minute… then two… then three…
Until it reached 7 minutes of me just staring at the loading screen, waiting for the magic to happen. Then by mistake, I hit refresh—and just like that, my dreams of watching a cat playing a Champions League football match with a fish were crushed.
As a user, I can’t handle waiting more than 30 seconds. So how am I supposed to wait around 7 minutes looking at a loading screen—knowing that anything could go wrong, the process could fail, and I’d have to start all over again?
The Proposed Solution 💡:
I thought for a minute… how can a business of this scale not know about webhooks and jobs?
That’s exactly what I want to talk about now.
What if… you tricked me? Yes, trick me! I want to hit "generate" and immediately get a response like:
“All good! We received your prompt. Don’t worry—we’ll notify you when it’s done ✅.”
And at the same time, that should actually be what’s happening in the background.
I just want to send you the request and immediately get a response. Then, whenever you finish processing in the background, just send me the result.
A Real-World Example:
You go to a repair shop to fix something.
Would you rather the guy tell you: “It’ll take me two hours, I’ll call you when it’s ready”?
Or would you prefer: “Sit here with me for two hours while I fix it in front of you”?
That’s the idea of using webhooks and jobs—I need a way to notify the server when the long-running, resource-heavy process is done.
(This isn't the only use case, but it fits perfectly with the AI model example here.)
Here's a proposed solution for this company:
(the user) send a request.
In reality, that server creates a job (call it whatever you want—it represents the background task of generating the AI model result).
This job info is sent to the AI model server.
On the AI Model Server, you queue that job using a message queue like RabbitMQ (or any other technology that implements that concept).
Once the AI model finishes the task, it should instantly notify the main server via a webhook so that it can send the result back to the user.
From what I’ve seen in my learning journey so far, a webhook is just a route (or more than one) that receives a request with the result in the body, coming from another service.
And that’s it.
This is a very simplified explanation of the concept, but I hope it serves as a good introduction to webhooks and jobs for anyone studying them and looking for a real-world use case.
If you're interested in the differences between webhook, long polling, and short polling, check out this short and sweet video:
https://lnkd.in/gFFjvVH5
Note 📌:
If there’s any incorrect or missing info, please correct me on LinkedIn from here:
https://www.linkedin.com/in/mohamed-abusaif-050/
so we can all benefit from a complete and accurate picture.
Stay safe, and may you always be on a journey of continuous learning 🚀❤️
Subscribe to my newsletter
Read articles from Mohamed Abusaif directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Mohamed Abusaif
Mohamed Abusaif
Back-End Developer, a Computer Science Graduate From Benha University, and a tech geek Who loves New Technology Topics. I love to try new stuff every day, gain new expertise, And expand my social network, Sharing knowledge about the stuff I learn everyday.