You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where the client sends a list of Image URLs along with a parameter "sync" or "async". In case of sync, the server is supposed to read all the URLs, and send the images to the client and at the end send a response stating "Downloaded successfully". Whereas in case of async, server is immediately supposed to send a response stating "Downloading Images" and send the images asynchronously.
I'm new to twirp, and not sure on how this can be implemented(as this seems to be server streaming problem).
Also, as of now, I have implemented sync functionality by using byte array, but the issue is I'm sending all the bytes of all the images at once. But it will be better to send the data in chunks(which again makes it a server streaming problem). How to achieve this as well?
The text was updated successfully, but these errors were encountered:
It's unlikely that the streaming proposal will be released in Twirp. Without knowing more about the exact requirements you have for your system, it's difficult to determine whether an async API is actually ideal. One drawback that you might encounter is that the workload for that single request is fulfilled by the single server that receives that request. In contrast, if the caller could send batches of requests to many servers with a portion of the total request, a synchronous approach might be a better fit and may have ideal scaling characteristics across a fleet of servers.
I have a use case where the client sends a list of Image URLs along with a parameter "sync" or "async". In case of sync, the server is supposed to read all the URLs, and send the images to the client and at the end send a response stating "Downloaded successfully". Whereas in case of async, server is immediately supposed to send a response stating "Downloading Images" and send the images asynchronously.
I'm new to twirp, and not sure on how this can be implemented(as this seems to be server streaming problem).
Also, as of now, I have implemented sync functionality by using byte array, but the issue is I'm sending all the bytes of all the images at once. But it will be better to send the data in chunks(which again makes it a server streaming problem). How to achieve this as well?
The text was updated successfully, but these errors were encountered: