I am currently storing correlations on Google Firebase in a structure that resembles the following:
{a: {a: 1.0, b: 0.6, c: -0.3, ...}, b: {a: 0.6, b: 1.0, c: -0.5, ...}, ...}
My goal is to efficiently retrieve a complete correlation matrix while also having the flexibility to choose any combination of items.
Although I have a solution in place using calls like "[GET]: /correlations/a/b", it requires multiple endpoint calls to download the entire correlation matrix, even though I eliminate redundancy by not calling "/correlations/a/b", "/correlations/b/a" and "/correlations/a/a".
I read about the possibility of using a [POST] request with a body to fetch the matrix by making just one call to the endpoint. However, I'm unsure if this approach is considered good practice or if there is a better way to tackle this issue.
Any insights would be greatly appreciated!