lkzhang
lkzhang

Reputation: 117

about sequence diagram for multi-threads java application

I want to draw sequence diagram for a multi-threads java application. Do you think a sequence diagram is Ok for a multi-threads java application(If so, I don't know how to do that as of now, any tutorials?)? Or should I draw multi-diagrams for multi-threads: one seqeunce diagram ties to a thread?

Upvotes: 2

Views: 1262

Answers (3)

Sean
Sean

Reputation: 152

There is the option of having the sequence diagrams created for you by a tool. I work on an Eclipse plugin called Diver: Dynamic Interactive Views For Reverse Engineering that will generate sequence diagrams for the various threads of your Java program automatically in Eclipse.

It lets you:

  • Easily trace your Java programs
  • Visualize your program’s runtime functionality
  • Filter your traces and sequence diagrams to make them more compact
  • Filter your IDE based on what methods are called at runtime
  • See what code ran in your source code editors

Upvotes: 0

Aaron Digulla
Aaron Digulla

Reputation: 328604

This kind of diagram is called "Petri net". It describes where concurrent processes (threads) synchronize and which parts run in parallel.

You can then explain each node in the Petri net using a sequence diagram.

Upvotes: 2

Eric Petroelje
Eric Petroelje

Reputation: 60498

I'd say to draw a sequence diagram per thread.

Trying to get multiple threads into a single sequence diagram doesn't make a whole lot of sense since events are occurring in parallel, not in sequence.

Upvotes: 1

Related Questions