Weird layout in deployment diagram

0 votes
asked Mar 6 in Question / help by ThePirate42

I'm trying to do a deployment diagram, this is a stripped down version of the code:

@startuml

node sensor {
    [firmware]
}

() stream1

node server {
    [transmitter]
}

() stream2

node router1

node client {
    [receiver]
}

() stream3

node router2

node pc << pc client >> {
    [software]
}

firmware -down- stream1
transmitter -up-( stream1

transmitter -right- stream2
receiver -left-( stream2

receiver -up- stream3
software -down-( stream3

sensor -down- server
server --down- router1
router1 -right- router2
router2 --up- client
client -up- pc

@enduml

Rendered diagram


As you can see from the image, stream2 gets put to the right of client, completely ignoring `receiver -left-( stream2`. Removing left from that line and right from `transmitter -right- stream2` improves the situation, but I still can't manage to put stream2 between transmitter and receiver, which to me seems the best layout. Does someone have any suggestion?

1 Answer

0 votes
answered Mar 7 by The-Lu (74,900 points)

Hello T., and all,

Here is an attempt... (without success..)

@startuml

rectangle " " as r0 {
node client {
    [receiver]
}
node router2
node pc << pc client >> {
    [software]
}
() stream3
}

() stream2

rectangle " " as r1 {
node server {
    [transmitter]
}
() stream1
node sensor {
    [firmware]
}
node router1
}

firmware -down- stream1
transmitter -up-( stream1

transmitter -right- stream2
stream2 )-right- receiver

receiver -up- stream3
software -down-( stream3

sensor -down- server
server --down- router1
router1 -right- router2
router2 --up- client
client -up- pc

@enduml

Regards,
Th.

...