Multi-threaded application example
jBixbe displays every thread in a separate view. Therefore it is very suitable for analyzing multi-threaded applications. This is shown by the following example called "smoker problem", a typical concurrent scenario. Three smokers sit around a table in a pub and are served by a waitress. In order to smoke a smoker needs paper, tobacco and matches and every smoker owns plenty of one of the three items. The waitress lays two items on the table and every smoker grabs at his missing items.
The scenario can be visualized by jBixbe in the following way. First of all a structure diagram helps to get an overview of the application structure. There you can see if the scenario was designed appropriately. The table object is of particular interest because its attributes show which items are currently on table. As the thread overview shows smokers and waitress are individual threads and for every thread a separate sequence diagram is opened. They display the communication of every thread object with the table object.
After all diagrams are opened and configured the scenario can be continued step by step. jBixbe handles at its own how the scenario has to be controlled so that no important events are skipped. You can also continue the scenario automatically. This is interesting when using timeouts.
The representation is already sufficient to get an estimation whether a concurrent application works as requested (for example no deadlock appears and there is no unsynchronized variable access). Note, it is not necessary to have a look at the source code level.