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

[API] Redefine workflow to notify client when an task status is updated #193

Open
gnuletik opened this issue May 17, 2020 · 1 comment
Open
Assignees
Labels
Milestone

Comments

@gnuletik
Copy link
Collaborator

As we talked before, we need to implement a way to notify clients when a task status is updated.

For example, to add an AnalysTrack, we need to :

  • Create an AnalysisTrack
  • Retrieve the AnalysisTrack every X seconds until its result_url property != 'Task Running'

This mechanism is poll-based and waste bandwidth and client/server resources.

We may implement a server-based notification with other protocols like :

  • EventSource
  • Websocket

Also, what are the other routes / models where we need to implement this server-base notification workflow ?

  • Task model ?
  • Result model ?

Note: Feel free to edit the original ticket to add technologies / models.

Thanks !

@gnuletik gnuletik changed the title Redefine workflow to notify client when an task status is updated [API] Redefine workflow to notify client when an task status is updated May 17, 2020
@Tointoin
Copy link
Collaborator

Tointoin commented May 17, 2020

Moreover, following views should be added docstring to document this workflow (relayed in schema and /api/docs/):

  • SubProcessorViewSet
  • AnalysisViewSet
  • AnalysisTrackViewSet

Both views and corresponding models may be refactored according to the defined workflow.

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

No branches or pull requests

4 participants