by jayaprabhakar on 9/4/24, 4:57 PM with 2 comments
FizzBee automatically checks your design for correctness and generates:
- Communication/Block Diagrams: Visualize the components and their interactions.
- State Diagrams: Show all possible system states and transitions.
- Sequence Diagrams: Explore how the system works interactively.
- System Trace Diagrams: Visualize detailed algorithm traces.
All this with less than 100 lines of code.
Here’s a snippet of how simple it is to model a two-phase commit:
```
action Write:
if self.state != "init":
return
self.state = "working"
for rm in self.PARTICIPANTS:
vote = rm.Prepare()
if vote == 'aborted':
self.Abort()
return
self.prepared.add(rm.ID)
self.Commit()
```Try it out and see more examples at https://fizzbee.io/tutorials/visualizations/.
Appreciate your feedback.
by jackdaniels4me on 9/4/24, 5:51 PM