an app has data persisted across several data sources (ds).
data sources could be local to the node, or across the network
data source could be in several forms, eg file based, or a database
data query can take non-trivial time, which needs to be factored in for making truly concurrent queries, to the extent possible.
,
the data has internal relationships in different ways. a successor query can depend on the result of a predecessor query. some paths are direct & obvious, followable like following breadcrumbs, some paths need to be computed.
example of former: get the addresses of first 10 students of the class. straightforward, read the first 10 students off the ds, pick out the id to their addresses, go back to the ds, get those addresses. done.
example of latter: for entire student merit list, let's say we wanted to take out first 100 students, look at their addresses, pick out the pincodes, and find other students grouped by pincodes and 50-50 gender ratio, who have performed poorly, so that we could pair a meritorious student to help other underperforming students.
several steps of queries are involved. several datasources might be involved, and some intermediate computation might be involved, this intermediate computation would help prepare the subsequent query.
so in the latter example, we have a merit list, we pick first 100 students off it, we pick the address id, then get the addresses, then reduce it to pincodes, we ask the ds (assuming asking is possible) ...
what does ZQuery actually help us achieve?