Currently, when fetching the list of 'Wines' (for example) at /wines, the web client makes a separate request for every single Wine on display - /tasting-note/wine/X
While these requests are very simple (and therefore inexpensive), it does add a large number of round trips to the server.
Consider baking certain counts into resource & resource list requests. For example, for a list of Wines:
[
{
"name": "string",
"wineMakerId": 1,
"regionId": null,
"type": "red",
"id": 1,
"tastingNotesCount": 6
}
]
Or for a single Vintage:
{
"year": 1800,
"wineId": 1,
"drinkFrom": 1800,
"drinkUntil": 1800,
"id": 1,
"bottles": {
"drunk": 0,
"stored": 5,
...
}
}
Currently, when fetching the list of 'Wines' (for example) at
/wines, the web client makes a separate request for every single Wine on display -/tasting-note/wine/XWhile these requests are very simple (and therefore inexpensive), it does add a large number of round trips to the server.
Consider baking certain counts into resource & resource list requests. For example, for a list of Wines:
Or for a single Vintage: