mountetna / magma

Data server with friendly data loaders
GNU General Public License v2.0
5 stars 2 forks source link

Add matrix type #106

Closed graft closed 4 years ago

graft commented 4 years ago

As suggested, this adds a 'matrix' type. The matrix type lets you store a vector of numbers with fixed column names in each record. The presentation is simple:

1) it may be retrieved through the query or retrieve interfaces as an array of numbers. 2) Updates are made through /update, with a JSON post of an array of numbers. Turns out it is pretty easy to post matrix values via /update, so there's no need to write a more complex loading endpoint for these records.

There is also a caching layer so magma does not have to deserialize the same JSON all the time. Instead the values may live in memory so subsequent queries should be faster.

Unfortunately some early matter included in this PR made changes relating to using metis (fixing the storage mechanism), which likely broke Timur's ability to upload files. Therefore even after merging this should not be deployed until the Metis/Magma stuff is done.