I've built a couple of dapps. The usual stuff. Say I have a BankContract with accounts and balances.
My recurring question is: the contract maintains state, but querying that state to get a list of accounts and their balances is hard (e.g. the contract cannot return an array of data items). So is it reasonable to expect that we have an external database (or cluster, to remove SPOF) that listens to filter events emitted by the contract, and we query against that instead?
How are other dapps handling this? E.g, Cicero's Weifund - If a user is using a UI, and wants to see all the available crowd-sourcing opportunities, how can they do that? Any listings created through the UI will be known by the UI (in a single page application SPA model), but when the user launches the SPA UI, how does it catch up on the status of other listings?
Hope this question makes sense,