Re: Promises: final steps

My colleagues and I are working on an extension for Chrome Web Inspector
that can communicate with promise libraries, particularly Q, over the
window message port. The tool, which will be renamed and rewritten before
it is ready for general use, adds a Promises tab to Web Inspector that
shows all currently pending and unhandled asynchronous errors, as well as
stack traces for both, and also progress information, albeit determinate,
indeterminate, or indeterminate but lively. There is a video accompanying
for demonstration.

https://github.com/montagejs/continuum

https://www.dropbox.com/s/2h68ax9j5mj7i6c/continuum.mov

The promise client broadcasts when a promise is deferred, when a deferred
promise is resolved, when a deferred promise makes progress (through the
`deferred.notify` interface), when a fulfilled promise is created, when a
rejected promise is created, and when a rejection is handled. As such, the
inspector can reconstruct whatever portion of the program’s promise history
it elects to retain.

In time, I intend to formalize a protocol. Ideally this system would be
useful for both “primordial” and library promises, and combinations of
both. Of course, any assistance would be valuable.

Also, ideally this would approach the functionality available to Causeway
and perhaps even *become* a manifestation of Causeway.

https://code.google.com/p/causeway/wiki/CausewayIntroduction

It would certainly be possible to show promises in multiple contexts,
including cross-origin iframes, and even show time sequence / Stevens
graphs for message passing between promises in multiple JavaScript
contexts, when promises are used as proxies for remote objects through a
facility like Q-Connection

https://github.com/kriskowal/q-connection

Kris Kowal

Received on Wednesday, 4 September 2013 19:22:34 UTC