Kaynağa Gözat

Merge branch 'master' of https://swopt.com:3000/enzo/Fis-AuditMessage

FAMBL 1 yıl önce
ebeveyn
işleme
237801fd93

+ 1 - 1
dependencies/fisappmessagejsutilty

@@ -1 +1 @@
-Subproject commit f00666ca8d90a9376e0ea08b8d54b5068a9560ea
+Subproject commit 4664e8bfc01ac865ac24afdcb0dfd8186625d837

+ 55 - 23
documentations/offlinetransmission.plantuml

@@ -1,43 +1,75 @@
 @startuml OfflineTranmission
 header Message OfflineTranmission
 left to right direction
-skinparam actorStyle awesome
 
 skinparam usecase {
     BackgroundColor<< Publisher >> Pink
     BorderColor<< Publisher >> Red
     BackgroundColor<< Subscriber >> YellowGreen
     BorderColor<< Subscriber >> Green
+    BackgroundColor<< Interrupt >> Pink
+    BorderColor<< Interrupt >> Red
 }
 
-package PublisherSite {
-    actor "Publisher" as Publisher  #pink;line:red;line.bold;text:red
+skinparam component {
+    PublisherSite 24
+}
+
+component "PublisherSite" as PublisherSite{
     (Parent) as (parentPub) << Publisher >>
-    usecase "Parent" as parentPub
-    () "Proxy" as proxy1
+    usecase "**Parent**" as parentPub
+    card 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 as 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
+    usecase "**Parent**" as parentSub
+    card SubscriberObservable as SubscriberObs1   #YellowGreen;line:green;line.bold;text:Black
+    card 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
-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 
+' (X) as (interrupt) << Interrupt >>
+' usecase "X" as interrupt
 
-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
+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
+' proxy1 *..* interrupt #line:Red;text:Red
+' interrupt *..* proxy2 #line:Red;text:Red
+proxy1 *.(0).> proxy2 #line:Red;text:Red : Internet Disconnected
+' destroy proxy1
+proxy1 == buffer : Store data \nin buffer should \nthe internet \nbe disconnected
 
+proxy2 -* SubscriberObs1  #line:Red;text:Red : Subscribe and \nReceive data 
+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:DarkGreen;line.bold;text:DarkGreen : 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.'/