offlinetransmission.plantuml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @startuml OfflineTranmission
  2. header Message OfflineTranmission
  3. left to right direction
  4. skinparam usecase {
  5. BackgroundColor<< Publisher >> Pink
  6. BorderColor<< Publisher >> Red
  7. BackgroundColor<< Subscriber >> YellowGreen
  8. BorderColor<< Subscriber >> Green
  9. }
  10. component PublisherSite {
  11. (Parent) as (parentPub) << Publisher >>
  12. usecase "Parent" as parentPub
  13. [PublisherObservable] as PublisherObs #Pink;line:Red;line.bold;text:Black
  14. port "Proxy" as proxy1
  15. database "buffer" as buffer
  16. }
  17. component SubscriberSite {
  18. (Parent) as (parentSub) << Subscriber >>
  19. [SubscriberObservable] as SubscriberObs1 #YellowGreen;line:green;line.bold;text:Black
  20. [SubscriberObservable] as SubscriberObs2 #cyan;line:blue;line.bold;text:Black
  21. port "Proxy" as proxy2
  22. port "Proxy" as proxy3
  23. }
  24. proxy1 *- PublisherObs #line:Red;text:Red : Publish data to \ndesignated subsriber \nover proxy
  25. PublisherObs --> parentPub : If internet is \ndown, NOTIFY \nparent publisher
  26. parentPub --> parentSub #line:blue;line.bold;text:Blue : Notify Internet \nWas Offline \nPlease Subscribe \nAgain
  27. proxy1 *..* proxy2 #line:Red;text:Red : Internet Connection \nInterruption
  28. proxy1 == buffer : Store data \nin buffer should \nthe internet connection \nstatus is offline
  29. proxy2 -* SubscriberObs1 #line:Red;text:Red : Receive data \nfrom Publisher
  30. proxy3 *- SubscriberObs2 #line:Blue;text:Blue : Subcribe to Publisher \nvia new Proxxy or \nexisting Proxy
  31. proxy2 *- SubscriberObs2 #line:Blue;text:Blue
  32. proxy1 *..* proxy3 #line:Blue;text:Blue : Subscribe to proxy \n to continue receiving \ndata
  33. parentSub -> SubscriberObs2 #line:Orange;text:Orange : Instantiate a \nnew Subscriber upon \nreceiving notification \nfrom Publisher's parent
  34. parentSub <- SubscriberObs1 : Persists data \nreceived from \nPublisher
  35. @enduml
  36. /' Briedf description
  37. Follow the red line first. It represents a normal flow of data/message transfer
  38. during an ideal situation.
  39. The blue lines represents when the internet is done and provides direction as to
  40. how the components handle the situation.
  41. So here, the the publisher will produce it's messages/payload to the subscriber
  42. using the imported library to enable remote transmission of the data via proxy.
  43. The same thing also for the other side, to which they will also need to use the
  44. same library in order to receive the transmitted data.
  45. Now, assuming the internet connection is interrupted for whatever reason, then the
  46. data will then be stored in the the buffer so to speak or whatever that the publisher
  47. wants to deal with it. The parent component will then keep track of the records
  48. and send it's notification to the subscriber's parents once the internet is back
  49. online. Meanwhile, there would be, ideally speaking, internal mechanism to deal
  50. with the ongoing data transmission that is occuring at the publisher's site.
  51. So, when the internet connection is back online, and upon receiving the notification
  52. from the parent of the publisher's site, it would then instantaite a new subcriber
  53. to subscribe to the previously subscribed publisher, and continue to receive the
  54. stream data. The publisher will of course stream the buffered data that failed to
  55. transmit to the relevant party.'/