Explorar o código

update on offline transmission uml diagram

Enzo hai 1 ano
pai
achega
5e43c0a5d6
Modificáronse 1 ficheiros con 41 adicións e 21 borrados
  1. 41 21
      documentations/offlinetransmission.plantuml

+ 41 - 21
documentations/offlinetransmission.plantuml

@@ -1,7 +1,6 @@
 @startuml OfflineTranmission
 header Message OfflineTranmission
 left to right direction
-skinparam actorStyle awesome
 
 skinparam usecase {
     BackgroundColor<< Publisher >> Pink
@@ -10,34 +9,55 @@ skinparam usecase {
     BorderColor<< Subscriber >> Green
 }
 
-package PublisherSite {
-    actor "Publisher" as Publisher  #pink;line:red;line.bold;text:red
+component PublisherSite {
     (Parent) as (parentPub) << Publisher >>
     usecase "Parent" as parentPub
-    () "Proxy" as proxy1
+    [PublisherObservable] as PublisherObs #Pink;line:Red;line.bold;text:Black
+    port "Proxy" as proxy1
+    database "buffer" as buffer
 }
 
-package SubscriberSite {
-    () "Proxy" as proxy2
-    () "Proxy" as proxy3
+component SubscriberSite {
     (Parent) as (parentSub) << Subscriber >>
-    actor "Subscriber" as Subscriber1   #YellowGreen;line:green;line.bold;text:Green
-    actor "Subscriber" as Subscriber2   #cyan;line:blue;line.bold;text:blue
+    [SubscriberObservable] as SubscriberObs1   #YellowGreen;line:green;line.bold;text:Black
+    [SubscriberObservable] as SubscriberObs2   #cyan;line:blue;line.bold;text:Black
+    port "Proxy" as proxy2
+    port "Proxy" as proxy3
 }
 
-' note "<b><size:18>Blue COLOR</size></b> is the \nfirst triggering mechanism for \noffline transmission." as N1
-' note "<b><size:18>Red COLOR</size></b> is the \nfirst line of streaming." as N2
-' note "Internet Connection Interrupted" as N3
-proxy1 <-- Publisher #line:Red;text:Red : Publish data to \ndesignated subsriber \nover proxy
-parentPub <-- Publisher : If internet is \ndown, NOTIFY \nparent publisher
-proxy2 --> Subscriber1  #line:Red;text:Red : Receive data \nfrom Publisher
+proxy1 *- PublisherObs #line:Red;text:Red : Publish data to \ndesignated subsriber \nover proxy
+PublisherObs --> parentPub : If internet is \ndown, NOTIFY \nparent publisher
 parentPub --> parentSub #line:blue;line.bold;text:Blue : Notify Internet \nWas Offline \nPlease Subscribe \nAgain
-proxy2 . proxy1 #line:Red;text:Red : Internet Connection \nInterruption
-' N3 . proxy2 #line:Red;text:Red 
+proxy1 *..* proxy2 #line:Red;text:Red : Internet Connection \nInterruption
+proxy1 == buffer : Store data \nin buffer should \nthe internet connection \nstatus is offline
 
-proxy3 <-- Subscriber2 #line:Blue;text:Blue : Subcribe to Publisher \nvia new Proxxy
-proxy1 . proxy3 #line:Blue;text:Blue : Subscribe to proxy \n to continue receiving \ndata
-Subscriber2 <-- parentSub #line:Blue;text:Blue : Instantiate a \nnew Subsscriber
-parentSub <-- Subscriber1 : Persists data \nreceived from \nPublisher
+proxy2 -* SubscriberObs1  #line:Red;text:Red : Receive data \nfrom Publisher
+proxy3 *- SubscriberObs2 #line:Blue;text:Blue : Subcribe to Publisher \nvia new Proxxy or \nexisting Proxy
+proxy2 *- SubscriberObs2 #line:Blue;text:Blue 
+proxy1 *..* proxy3 #line:Blue;text:Blue : Subscribe to proxy \n to continue receiving \ndata
+parentSub -> SubscriberObs2 #line:Orange;text:Orange : Instantiate a \nnew Subscriber upon \nreceiving notification \nfrom Publisher's parent
+parentSub <- SubscriberObs1 : Persists data \nreceived from \nPublisher
 
 @enduml
+
+/' Briedf description
+Follow the red line first. It represents a normal flow of data/message transfer
+during an ideal situation. 
+The blue lines represents when the internet is done and provides direction as to
+how the components handle the situation.
+So here, the the publisher will produce it's messages/payload to the subscriber
+using the imported library to enable remote transmission of the data via proxy. 
+The same thing also for the other side, to which they will also need to use the
+same library in order to receive the transmitted data. 
+
+Now, assuming the internet connection is interrupted for whatever reason, then the 
+data will then be stored in the the buffer so to speak or whatever that the publisher
+wants to deal with it. The parent component will then keep track of the records
+and send it's notification to the subscriber's parents once the internet is back
+online. Meanwhile, there would be, ideally speaking, internal mechanism to deal
+with the ongoing data transmission that is occuring at the publisher's site.
+So, when the internet connection is back online, and upon receiving the notification
+from the parent of the publisher's site, it would then instantaite a new subcriber
+to subscribe to the previously subscribed publisher, and continue to receive the
+stream data. The publisher will of course stream the buffered data that failed to
+transmit to the relevant party.'/