How to use UML for describing distributed tasks - parallel-processing

I am preparing a presentation and want to show some UML diagrams which will tell about how my distributed program runs. Since UML is a common language in the software world, I thought that it is one of the best ways to tell about the things in my mind to the listeners.
The problem is that I don't know how I can use UML diagrams for some distributed tasks. Firstly, I want to use Sequence diagrams and show the distributed components as actors. It looks possible. But, how can I demonstrate mpi_reduce_all function in this diagram? And, how can I demonstrate asynchronous communication and then synchronization (i.e. after a while I run isend/irecv commands, I synchronize the processes using wait_all function)?
Is there any idea for this? Or alternative diagrams to demonstrate what I want?

Check uml-diagrams.org: UML Activity Diagram Examples. The Fork/Join node in UML Activity Diagram is explicitly designed to show parallel tasks and synchronization points.
For the purposes of a presentation consider BPMN. The Business Process Model and
Notation (BPMN) language is also common in the software world and is also backed by the Object Management Group (OMG).
Description of parallel tasks and data exchange and synchronization points is among it's strong features.
See also:
Bonitasoft: The Ultimate Guide to BPMN2

Related

How to use an activity diagram to detail classes & methods?

I wish to document code for a fairly complex algorithm whose implementation is intertwined across several methods and classes. A sequence diagram cannot really describe the detail of each method well so I am looking at an activity diagram; however this doesn't typically seem to represent classes and methods, only the logic.
Is there a common or even proper way to show which methods the logic belongs to? I do not need to follow strict UML, the purpose is simply to make it clear what's happening visually.
Activity diagrams and partitions
The activity diagram are supposed to models activities without necessarily relating them to classes/objects. They are however very suitable for modeling complex algorithms, as they allows to show :
the control flow -- flowchart diagrams have proven effective for modeling alorthims; activity diagrams are much more precise in their semantic and can do this as well.
object flows that show what objects are passed through
there are object actions that are specifically meant for dealing with objects
Activity diagrams support partitions, i.e. visual grouping of activities according to a criteria. A popular use is to split actions by using subsystems as grouping criteria. Breaking down by classes seems overkill, but nothing forbids such groupings if it helps, and if you're able to use it consistently.
Interaction overview diagrams
Interaction Overview Diagrams are specialization of Activity Diagrams that represent Interactions.
Interaction overview diagrams are a kind of combination of activity and sequence diagrams. The general idea is to use some activity modeling features for showing the big picture of the flows, between interaction nodes, i.e. mini sequence diagrams embedded in the larger diagram, to show which objects are involved and what messages they exchange.
There is an inspiring example here. But be careful: the linked website is based on a former version of UML and the text is not fully up-to-date. The most accurate source on these diagrams is section 17.10 of the UML 2.5.1 specs.
Additional thoughts
Instead of trying to show everything in one diagram, you may prefer the beauty of simplicity: use an easy to understand, simpler overview diagram, and uncover the complexity in additional diagrams that focus on details. This works with activity diagram complements with more detailed activities or sequence diagrams. But it also works the other way round, showing exchanges between key objects in a sequence diagram, and provide more detailed activity diagrams to describe what happens inside of one of the invoked operation.
Disclaimer: While I provide some hints that you can use to model algorithms in relation with their classes, I have at the same time to warn you that visual programming, i.e. a very very very detailed modeling, may lead to very complex diagrams that are difficult to read, and even more difficult to maintain. They loose the benefit of communicating the big picture. I'm not alone in this criticism, see Grady Booch who knows what he is talking about, since he is one of the co-inventor of UML, Martin Fowler, and many others

Apache Beam and ETL processes

Given following processes:
manually transforming huge .csv's files via rules (using MS excel or excel like software) & sharing them via ftp
scripts (usually written in Perl or Python) which basically transform data preparing them for other processes.
API's batch reading from files or other origin sources & updating their corresponding data model.
Springboot deployments used (or abused) to in part regularly collect & aggregate data from files or other sources.
And given these problems/ areas of improvement:
Standardization: I'd like to (as far as it makes sense), to propose a unified powerful tool that natively deals with these types of (kind of big) data transformation workflows.
Rising the abstraction level of the processes (related to the point above): Many of the "tasks/jobs" I mentioned above, are seen by the teams using them, in a very technical low level task-like way. I believe having a higher level view of these processes/flows highlighting their business meaning would help self document these processes better, and would also help to establish a ubiquitous language different stakeholders can refer to and think unambiguously about.
IO bottlenecks and resource utilization (technical): Some of those processes do fail more often that what would be desirable, (or take a very long time to finish) due to some memory or network bottleneck. Though it is clear that hardware has limits, resource utilization doesn't seem to have been a priority in many of these data transformation scripts.
Do the Dataflow model and specifically the Apache Beam implementation paired with either Flink or Google Cloud Dataflow as a backend runner, offer a proven solution to those "mundane" topics? The material on the internet mainly focuses on discussing the unified streaming/batch model and also typically cover more advanced features like streaming/event windowing/watermarks/late events/etc, which do look very elegant and promising indeed, but I have some concerns regarding tool maturity and community long term support.
It's hard to give a concrete answer to such a broad question, but I would say that, yes, Beam/Dataflow is a tool that handle this kind of thing. Even though the documentation focuses on "advanced" features like windowing and streaming, lots of people are using it for more "mundane" ETL. For questions about tool maturity and community you could consider sources like Forrester reports that often speak of Dataflow.
You may also want to consider pairing it with other technologies like Arflow/Composer.

Modelling logic

I have an interface (android activity, but that should not matter) with text input, spinners and a toggle button (all on one page). Depending on the state of all these elements I produce text output (on the same page).
Since the relationship is not trivial, I would like to somehow visualize the logic relationship between these elements. I am reading about UML, activity diagrams, etc but got a bit lost there.
What term should I look for? What program do you recommend to use for drawing such diagrams on computer (linux)?
UML Activity Diagrams might not be what you are looking for. They are usually used to model activities in a process. They tend to be more high-level and conceptual and less about the implementation.
From your question it reads as if you are working on the implementation itself. In that case I would urge you to look at UML State Diagrams. They are really neat when you want to think about different states your application (or components of your application) can be in. It also lets you logically decompose behaviour into states.
Furthermore, it is also a straight-forward way to model your application in a way that you can apply a Design Pattern, notably the State Pattern, to implement your model.

Creating a Dynamic/Visual Systems Diagram from Energy Flows

I am working on a technical engineering solution of connecting systems to other systems throughout a building environment. I am attempting to create a diagram that visually shows an input energy and then flow it through a series of systems, each of which will use a portion of that energy for operation. The diagram will update with different operations based on amount of energy, time of day, location, and desired output (heating or cooling).
The problem I have is that I need an extremely visual way of laying this out in a dynamic way. This all sounds super technical but to simplify, I'm basically creating a systems operation diagram (OR workflow diagram) that needs some serious power and visualization. I hope to make this a powerful tool in which, environmental data will automatically alter the diagram's configuration.
I am comfortable with learning a programming language if necessary but I'm just not sure which will be the best. I would like to start simple with one configuration and keep implementing new parameters. I was looking at Python, JavaScript, C++, C#, and VisualBasic. I almost imagine this like a game design for aesthetics but I'm not sure.
Below is a static example of the systems diagrams created for one specific case. This example is only the diagram and lacks any interactivity. Basically I would like to make a dynamic and interactive diagram that can take inputs and alter itself. But for starters, change visually with specific button presses.
Original

Best way to model Installation logic/flow

We are currently working on designing the installer for our product. We are currently on the design phase and I'm wondering what is the best diagram (UML or not) to use when modeling installation logic or flow?
Currently, we are using the good'ol flowchart.
Thanks!
What problems are you having with the flowchart? Are you trying to model the functional flow of the application or the logic flow through the components of the system?
If you're just trying to show how the installer works from a functional perspective, then a flowchart is fine and has the advantage of being understandable by non-technical people.
But if you're doing a technical design, then probably you should use UML class and sequence diagrams. The class diagram shows the static relationships between classes, while sequence diagrams show how the classes interact to implement the functions of the application. You'll generally only need one class diagram but a whole bunch of sequence diagrams, because you need to work out the logic flow for each of the use cases that you've identified.
UML defines other diagram types that are all useful under limited circumstances, but class diagrams and sequence diagrams will get you 90% of the way home at least.
There's a diagram called a collaboration diagram that's related to a sequence diagram in that both show interactions between components. A collaboration diagram is what you create when you draw a bunch of boxes on a napkin and with arrows between them to show how components talk to each other. You may find that starting out with collaboration diagrams is easier.
This is a useful tool for making sequence diagrams:
http://www.websequencediagrams.com/

Resources