-
Notifications
You must be signed in to change notification settings - Fork 8
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]: Get Training Backend to Update User on Training Progress with AWS Appsync #920
Comments
Hello @dwu359! Thank you for submitting the Feature Request Form. We appreciate your contribution. 👋 We will look into it and provide a response as soon as possible. To work on this feature request, you can follow these branch setup instructions:
Feel free to make the necessary changes in this branch and submit a pull request when you're ready. Best regards, |
@dwu359 can you provide more detail? |
can you provide more detail here? |
Why aws appsync instead of websockets? |
Appsync seems to handle the websockets stuff for us, but if you are able to find a way to implement it via websockets, then go for it. I will say though that I looked into implementing it via websockets before and the library support for websockets isn't as good as rest apis. |
I just don't see the need to use another service, and it'll also complicate development (we'd have to deploy to some staging env every time we want to test something?). I'll look into libraries |
What other uses of websockets do you think we'd want to add in the future? |
Django channels seem to be the accepted library for websockets, and the implementation won't be too bad. The one thing is we'd probably have to port our training methods as new websocket consumers and also deal with authentication a bit differently in a middleware. So, it seems like either:
In terms of effort, 2 < 1 = 3 |
@dwu359 ? |
Django channels seems like a good start, keep in mind you will need to find some way to host the websockets server (likely thru ec2) and access it (likely through api gateway or something else). I'm sorry I can't help much further, I'm no longer a direct contributor to this project and it seems like at this point you know more about websockets than I do. |
Feature Name
Get Training Backend to Update User on Training Progress with AWS Appsync
Your Name
Daniel Wu
Description
The http protocol that we use to communicate between the frontend and backend is unidirectional, meaning that the frontend needs to send a request for the backend to send back a response. To send back training progress, the backend needs to send multiple messages back to the frontend after the initial training request. Luckily, AWS AppSync handles that for us with its websocket pub/sub apis, which can be used to allow bidirectional communication between the frontend and backend. More specifically, we can have both the frontend and backend listen to AppSync's websocket endpoint for messages of a particular channel id and have both the frontend and backend make graph api requests to AppSync to send messages with the same channel id.
Use AWS AppSync to update the user on training progress for a particular training request. For now, let's say that training progress means the # of epochs completed.
The text was updated successfully, but these errors were encountered: