offlinetransmission.plantuml 3.5 KB

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