All modeling is done using class diagrams, which is the model I got when reversing the full project from java code to UML. I create a model for each project and then merge them inside a larger project. I mean that when I model a large application which is composed by more than one project. I know that the model merge is not a well known concept but it works really well within Eclipse with Omondo. You would be able to have the same class with different views and navigate in the model and code by clicking on the class, the diagram or the code. some methods are synchronous and return a result while others are asynchronous that get requests queued up and return results for instance via a callback on a different thread.įor multi-threaded applications using the same class, the trick could be to drag and drop the same class into each model representing a thread.some fields of an object may be read from any thread, but written to only from one.some objects might live in a certain thread while others have no thread-affinity.Are there any extensions to classic UML that take into account the peculiarities of multi-threaded applications, e.g.What types of diagrams have you found to be most helpful in understanding multi-threaded applications?.I don’t want to use these diagrams as a high-level view of the problem domain, but rather as a detailed description of my classes/objects, their interactions and the limitations due to thread-boundaries I mentioned above. Most literature I have dug up on the topic such as Designing Concurrent, Distributed, and Real-Time Applications with UML by Hassan Gomaa had some nice ideas, such as drawing thread boundaries into object diagrams, but overall seemed a bit too academic and wordy to be really useful. Consequently, associations between classes don’t necessarily mean that I can call methods on those objects, but instead I have to make that call on the target object's thread. This type of diagram, however, hasn’t been very helpful when trying to understand heavily multi-threaded/concurrent applications, for instance because different instances of a class "live" on different threads (meaning accessing an instance is save only from the one thread it lives on). For single-threaded applications I like to use class diagrams to get an overview of the architecture of that application.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |