parallel message flows
Great project.
I'd like to have the parallel message flows, in some way.
For the following example: A->B:hello B->A:hello_ack C->D:hello D->C:hello_ack
The communications between C and D do not depend on A and B, so communications between C and D do not necessarily happen after that between A and B. And in the generated chart, the first hello and the second hello may be side by side, not necessary from top to down.
Parallel flows, and other more complex signals will be supported eventually. (loops, if/else, etc).
Big thumbs up on this. Now that async-await is a thing in ES6, asynchronous flows are more the norm than the exception. Being able to diagram such flows would be really slick.
If I may offer a suggestion for a possible approach to this:
- Denote Async blocks using indentation, with each block starting with a
:(block name)line (withblock namebeing optional) - Async blocks flow sequentially with events above/below them
- Adjacent async blocks flow in parallel to one another
- Async blocks can be nested
For example:
X->B: XB
:BA sequence
B->A: BA
A->B: BA_ack
:BD sequence
B->D: BD
:DC sequence
D->C: DC
C->D: DC_ack
:DE sequence
D->E: DE
E->D: DE_ack
D->B: BD_ack
B->X: XB_ack
Would render as:
X A B C D E
|------------|------------|------------|-----------|------------|
| > XB -----------------> | | | |
| | < BA ----< | > BD ----------------> | |
| | > BA_ack > | < DC ----< | > DE ----> |
| | > DC_ack > | < DE_ack <
| | < BD__ack -----------< |
|< XB_ack --------------< |
(Note: A nice enhancement would be to label the block if a block name is provided.)