I know that the question seems odd, but I’ll try to explain it as well as I can.
I have a docker-compose
file with 4 services: zookeeper
, kafka
, schema registry
and redis
. Besides that, I also have 2 SpringBoot
microservices which use the dockerized services. The first microservice receives HTTP requests from Postman and then processes those requests before sending them to a topic. The second microservice reads from that topic, processes the messages and sends them to, you’ve guessed it, another topic.
How would a UML use-case diagram for this situation look like? I have no idea how to start because I’ve always identified roles first and took it from there. In this case, there are no people actually using it because it’s just meant to collect some data and manipulate it.
My professor told me I had to have a use-case diagram, so I suppose it has to be possible to draw it, I’m just confused in how to start.
Also, if you have any recommendations on which diagrams can explain microservices nicely, let me know.
2
Answers
You are already focusing on a technical solution, i.e. how should it work. You have described here in details a system made of several microservices, and using some identified technologies for their implementation.
But the systems have a purpose. They are meant to interact with some actors and help themto achieve some goals. This is what use-cases are about: what’s the purpose of the system for which actor. And whether it’s 12 microservices or 1 monolith, does absolutely not influence the use-cases, since these are independent of the inner structure of the system.
Unfortunately, nothing in the narrative tells us what this system is supposed to to nor for whom. This is where you should start.
Finally actors of the UC diagram can be human users or technical systems (i.e. independent systems).
You can use feature in use case diagram called
include
. Basically,include
means a use-case will call other specific use-case. (see https://www.uml-diagrams.org/use-case-diagrams.html for reference). If you have chain of activity on multiple microservices, you can connect them usinginclude
like so:Note that use case diagram doesn’t care about technology used to build an app. It doesn’t care what’s under the
include
between your services. It was intended as pure abstraction to allow non-developers to understand it.