explanation.txt 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. Latest change as of 12/11/2024
  2. Currently following the diagram from Chin.
  3. So, right now, transmitter file, even though it can act as a receiver, will act as a server application. So it will instantiate a transmission manager first thing first, separating
  4. from application logic. So when the transmission manager is instantiated, it will also instantiate the necessary transport service. Please DO NOTE that at the moment, the code is
  5. hardcoded to only work with 1 type of transport and a singular transport, which is Websocket. I have not design a system where it can cycle through multiple transport. But can be
  6. enhanced later on. Going back to transmission manager, once the transprot service, aka socket service in this case is instantiated, it will start listening to events. Events like
  7. whether or not is there a new or old client connected, and whether or not is there any new requests or messages or notifications. There are many events going on, but for the
  8. transmission manager, it's only concern is whether or not if it's a new client or old client. So, it's only subscribing to these two types of events, and based on these events,
  9. let's say it's a new client has been established, it will instantiate the necessary transmission instances needed to transmit and receive message.
  10. Here's how it works. A new client is connected, transmission manager will talk to connection/adapter manager to instantiate the necessary adapters according to the transport services
  11. that are available. A set of transmission instance, which is transmitter, receiver and request response instances will be returned so that the applciation can start sending and
  12. receiving messages through the aforementioned instances. And the adapters acquired from adapter manager will be attached alongside with the transmission instances.
  13. Retransmission will be implemented at the transmission level.
  14. Please note that the current code is only tested with one on one, which means only 1 server and 1 client, and it's a one way communication at the moment. I have yet to test it with
  15. multiple clients, but the current test is working so far with the retransmission. To emulate internet disruption without manually shutting down both the server and the client, I
  16. came up with an idea of writing another middle-man. or a proxy if you would, to simluate internet disruption by just shutting off the proxy, so that the socket on each side of the
  17. party can pick up the event, and notify/broadcast the information to the parties concerned. That's where the retranismission can shine.
  18. Things to do:
  19. i) Still need to test it out with multiple clients
  20. ii) Try it out with http as well, need to allocate time to code http services to emulate bi-directional streaming
  21. iii) Haven't try to use request-response. To be enhanced.
  22. iv) Implement dual roles: Eg => A server can be both transmitter and receiver. <Current Level only transmitter>
  23. v) Mutliple adapters implmentation. <TBD> (Need to discuss the logic to cycle through the transport and metrics measurement)
  24. Final i) General Documentation and it's associated components.
  25. Final ii) Clean Code (Usually this is done after prototype is functionally acceptable and stress tested.)
  26. As of 14/11/2024 <Since there's no slot for meeting for the rest of the week>
  27. Things to consider:
  28. i) Multi Client test.
  29. -Make sure it can work with multiple clients. And yes, more proxy will need to be prepared to simulate that.
  30. ii) Request Response simulation. Make sure the receiver can make request and acquire response (Not referring to request Response adapter. Just use the existing two channel)
  31. -Enable the response generator aspect to simulate such cases. Also, there is a need for a counter so to speak, so that the message
  32. received by the receiver matches.
  33. -Also, need to consider also seqences once the above is tested. Because retransmission does help in wrapping. Either the retransmission do the wrapping or this message interface
  34. do the wrapping. <TBD> {Just a thought, the wrapping message format can be implemented across, since transmission and adapter level don't really care?? Need to check again}
  35. iii) Http Transport service
  36. -This one will take some time, because need to emulate it to mimic bidirectional streaming, so there's a need to emulate logical channel
  37. iv) Think about requestresponse transmission and it's associated adapter's implementation
  38. -Do this when I have too much time to waste
  39. Discussion Points:
  40. i) Explore multiple traffic concept
  41. -To make use of different ports as well as multi ISP to stream data. Eg: External Netword card.
  42. -See how I can talk to underlying OS network configuration to make use of the network stream and delegate ports to it
  43. ii) Move transport service instantiation to adapterManager