Reputation: 209
We have set of services in a vertx cluster. We serve web front end through a API gateway which is one service within the cluster. Client ask a requirement for download some data as a CSV file. It should be transmitted as bellow.
Service A --(Event bus)---> API gateway ---(Web socket)---> Browser
My question is, is it wise to stream such file over event bus from Service A to API gateway? (File may get as large as 100 MB)
Upvotes: 2
Views: 657
Reputation: 79
You can, but its not designed for it. Will create congestion because the entirety of the file will be kept in memory until transfer is complete. Just set up a http server, communicate the url through a consumer and upload it over http. Then you get all http support as well.
If you don't want a perm http server for it, just start one whenever a request for an upload comes in.
Upvotes: 2