justUp
justUp

Reputation: 1

Interface definiton and port typing with SysML/UML

I would like to describe services as components with their ports and interfaces. It should become clear by the description, what functionalities are provided, and how to utilize them.

In my understanding, I can type a port either with this notation <name>:<type>, where the type can be specified by an interface block? Or using the "lollipop", where the interface type is specified by the name of the "lollipop"?

enter image description here

Now, I would like to see what application or transportation protocol is utilized by a interface/port, to get an idea on how to connect to it. But I don't know what is the best way to do so. I thought about two ways.

First: specifying the protocol (here TCP/IP) by the port type and the interface (provided information) by the "lollipop" notation.

enter image description here

Second: specifying a transportation/application protocol as the base interface of an application specific interface.

enter image description here

I really don't know if any of that makes sense or if there is a better way to describe that. Please let me know.

EDIT:

Based on the answer of qwerty_so, I understand that the generalization of an interface from a protocol is wrong. But to indicate the utilized protocol, it should be specified by the port type? Based on that, I made another representation of two components (this time in UML, i hope it doesn't cause any confusion). Each component provides the same interface through a varied port. Basically it is the same as the first notation, extendet by the realize relation from the lollipop to the interface. The first component utilizes a basic TCP/IP and the second a gRPC protocol in order to realize the Interface1.

two components with different port types and same interface

Is that a more accurate way to represent the interface and its realization by a specific protocol?

Is the realize relation necessary, because shouldn't it be clear by the interface name?

Upvotes: 0

Views: 1309

Answers (1)

qwerty_so
qwerty_so

Reputation: 36323

TCP/IP is a protocol. And that's what is used for the port. Draw a realize relation from the port towards the interface.

The interface1 is the software interface. So draw a realize relation from the lollipop towards that.

Your lowest design would be wrong since interface and protocol are two very different things.

I always think of a port a a plug bundling a number of (SW) interfaces. In SysML terms it also extends to power supply as interface (which for pure soft-workers is kind of strange ;-).

Upvotes: 0

Related Questions