If I remember correctly, I think @ernestogimeno mentioned to me that the jsonld corpus format has some limitations that may affect the scalability so at some point we may need to use a real database.
A possible option is to use a graph database such as Neo4j. In this database, the information is stored in graph format so it might be suitable for our needs.
I just put this thought here for future discussion if we need to upgrade the jsonld format.