I am modeling a system that exposes a number of "plugins" (not known at modeling time) through a web API. I have a number of "system" plugins that permit to interact with the system, something like "list plugins", "describe plugins", "submit job (plugin execution)", "get job status", ... System and user plugins are exposed through either or both a JSON-RPC interface and WPS.

However I cannot figure out a component diagram depicting the fact that the same "logical" interface ("list plugins", ...) is exposed through physical interfaces (JSON-RPC and WPS). I would like to avoid replications and changing what is the standard description of the JSON-RPC and WPS interface. I feel this is something similar to the internet stack (e.g. TCP interface is built on top of IP interface), but I was not able to find diagrams of this.

  • Ports maybe? Technically on component diagram you depict logical level of architecture and I don't think you should show the technology behind. This seems more like a deployment diagram goal. I'm not making it an answer as obviously I'm not sure if I'm correct here, just pointing a direction. – Ister Mar 19 '19 at 10:46
  • I already considered ports, but, to my understanding, they are meant to group homogeneous sets of interfaces. And what would be ports and what interfaces? I of course also considered to omit the physical interface, but I feel like it is an important part, also in the prospective that the system may be extended with new physical interfaces in the future. Are not deployment diagrams meant to describe only where components are installed, not how they communicate each other? – Corrado Mar 20 '19 at 9:41
  • Well, as I wrote, I'm not entirely sure of using ports. Yes, they do group interfaces that share some common properties and in this case you could consider them to be sharing the physical implementation. I don't recall anything in UML Spec preventing you from having the same interface type in more than one port. If I were certain of my answer it would be answer not a a suggestion in a comment. Give me some time (2-3 days probably). I'll dig into UML Spec about port usage as I recall there was something like that there (or you can dig yourself ;-) ) – Ister Mar 21 '19 at 7:47

After days of digging in UML documentation I realized I was probably missing an important actor, the client. After introducing it in the picture, it became clear that I can "nest" interfaces by simply concatenating them, once outside-in, once inside-out (very like the TCP/IP example!). In the actual example, I ended up with the following diagram (I added the nodes just to make it clearer)

component diagram

Notice how the "higher level interface" IMYSYS is replicated twice, because there is a "Protocol" acts like a man-in-the-middle. As @Ister pointed out, the actual "physical" interface is just an implementation detail of "Protocol".

I am still not sure about the exact classifiers, but I think this diagram depicts quite well and in a well-understandable way the structure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.