I have the following problem.
One of the endpoints for my spring-boot controller has to return a POJO with a couple of big BLOBs plus some metadata information about those BLOBs.
We need to be able to send first the metadata information (so that UI can display it without any delay), and then send the BLOBs, all part of the same RESTful request. If we send the metadata + BLOBs all in the same response, it would impact the performance and UI will seem sluggish.
I've been exploring the Future, DeferredResult etc, but I couldn't find how a JavaScript client can benefit from them.
Ideally, the response would contain the metadata plus some uniquely generated endpoints to fetch the BLOBs that controller would keep cached for the time-being, till they are requested.
I wonder what approach I can take here?