A music generator makes an interesting web application problem: the form submission is quick, but the work behind it takes minutes.
I'm building Melumi , an AI music generator that turns lyrics or ideas into songs and also supports instrumental music. Once generation begins, a song is usually ready in about 2β3 minutes; queueing before that can add time.
This post describes the high-level task architecture behind that experience. The examples are simplified design sketches, rather than a complete implementation.
Start with a durable task
Keeping a browser request open for the entire generation process ties the experience to a fragile connection. A page refresh or network interruption should not erase the record of work already accepted by the server.
The application creates a task, stores it in the database, and returns an application-owned task ID after the submission has been accepted.β¦