Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Optional Client Webhooks #228

Open
artokun opened this issue Feb 1, 2025 · 0 comments
Open

[Feature Request] Optional Client Webhooks #228

artokun opened this issue Feb 1, 2025 · 0 comments

Comments

@artokun
Copy link

artokun commented Feb 1, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant