Logical framework for complex asynchronous structures (uses promises)