aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/doc/puml/HighLow.puml
blob: f672cf81d91e87d5e613abfd8ef48e812c7d3f51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@startuml "High and Low Prioty Messages"


participant "Vehicle Application" as application
participant "Vehicle Edge MQTT Client" as client
participant "MQTT Broker" as broker
participant "Vehicle State Service" as vehstat 
participant "Connected Vehicle Compute" as cvc
boundary "Incoming Event/Request" as pub

note left of application: This flow assumes \n the previous security \nlifecycle has been\n completed and TLS TCP \n connection established

client -> broker: Connect
broker -> broker: Authorization check
broker -> client: ConnectAck
broker -> vehstat: <client_id> Connected
application -> broker: Subscribe <topic_id>
broker -> application: SUBACK
broker -> vehstat: <client_id> Subscribed to <topic_id>

pub -> cvc: Message/Request for Vehicle
cvc -> cvc: Create Message
cvc -> vehstat: isVehicleSubscribed to <topic_id>
== More Complex Orchestration ==
alt Vehicle Not Connected and Subscribed
vehstat -> cvc: isVehicleSubscribedResponse (Not Subscribed)
alt High Priority Messages Success 
note right of cvc: High Priotity messages are messages\n that are urgent have an\n execution requirement that requires a low latency.\n i.e. Remote Door Unlock.
create SMS  
cvc -> SMS: Send vehicle "Shoulder tap"
SMS -> client: Wake up Message
client -> broker: Connect
broker -> broker: Authorization check
broker -> client: ConnectAck
broker -> vehstat: <client_id> Connected
application -> broker: Subscribe <topic_id>
broker -> application: SUBACK
broker -> vehstat: <client_id> Subscribed to <topic_id>
vehstat -> cvc: Client is now Connected and Subscribed

else Shoulder Tap Fails
cvc -> cvc: Timeout passed
cvc -> pub: Response "ERROR: Vehicle Not Reachable" 
end  
alt Low Priority  
create localMessageStore
cvc -> localMessageStore: Store Message with long TTL
cvc -> vehstat: postNotifyRequest
note left of cvc: <&timer> passes less than ttl
client -> broker: Connect
broker -> broker: Authorization check
broker -> client: ConnectAck
broker -> vehstat: <client_id> Connected
application -> broker: Subscribe <topic_id>
broker -> application: SUBACK
broker -> vehstat: <client_id> Subscribed to <topic_id>
else Cient Does not Connect Before TTL  
cvc -> pub: Vehicle did not connect before timeout
end
cvc -> broker: Publish to <topic_id> 
broker -> cvc: PUBACK
broker <-> application: message received
application -> broker: ACK (QoS dependent)
applicaiton -> application: deserialize and take action
application -> application: create response message
application -> broker: Pubish Response to <response_topic_id>
broker -> cvc: Response Message
cvc -> pub: Response Message
end  








@enduml