Skip to content

[Feature Request] Optional Client Webhooks #228

@artokun

Description

@artokun

Is your feature request related to a problem? Please describe.
The current implementation lacks real-time feedback during song generation. Clients are left waiting silently for a response, without any insight into the progress or status of the generation process. This can lead to a poor user experience, especially for longer generation tasks.

Describe the solution you'd like
I propose implementing webhook support for the song generation process. This solution would include:

  1. Returning a job ID immediately upon request initiation, allowing clients to track their generation tasks.
  2. Providing an optional webhook URL parameter in the API request.
  3. Sending real-time updates to the provided webhook URL as the server generates logs or reaches significant milestones in the generation process.
  4. Maintaining the existing REST endpoint structure while adding this non-blocking, asynchronous communication channel.

This approach would allow clients to receive timely updates and provide a more interactive experience during song generation.

Describe alternatives you've considered
An alternative solution would be to implement a WebSocket service alongside the existing REST endpoints. This would provide a persistent, bi-directional communication channel between the client and server, allowing for real-time updates during the song generation process. The WebSocket service could leverage the same underlying technology as the REST endpoints, ensuring consistency in the backend implementation.

Additional context
Implementing webhook support or a WebSocket service would significantly enhance the user experience by providing real-time feedback during song generation. This feature would be particularly beneficial for longer generation tasks, allowing users to monitor progress and potentially make informed decisions based on intermediate results. Additionally, it would reduce the need for long-held connections, improving overall system efficiency and scalability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions