Thursday, October 8, 2020

Network engineering continued ...

   This is a continuation of the earlier posts starting with this one: http://ravinote.blogspot.com/2020/09/best-practice-from-networking.html 

  1. Event-based programming is harder to co-ordinate and diagnose as compared to sequential programming yet it is fondly used in many storage drivers and even in user mode components that do not need to be highly responsive or where there might be a significant delay between action triggers. This requires a driver verifier to analyze all the code paths. Instead, synchronous execution suffices with an object-oriented design for better organization and easier troubleshooting. While it is possible to mix the two, the notion that the execution follows the timeline in the logs for the activities performed by the storage product helps, reduce the overall cost of maintenance. 


  1. StackTraces:  When the layers of a software product are traversed by shared data structures such as login contexts, then it is helpful to capture and accumulate the stack trace at the boundaries for troubleshooting purposes. These ring buffer of stack traces provide instant history for the data structures  


  1. Wrapping: This is done not just for packets, certificates, encryption, or exceptions. Wrapping works for any artifact that is refreshed or renewed and we want to preserve the old with the new. This may apply even to headers and metadata of data structures that fall in the control path


  2. Boundaries: The boundaries in a continuous stream of data is usually dependent on two things: a fixed-length boundary of segments or a variable length depending on the application logic. However, the application refers to the component and the scope of performing demarcation on the data. Therefore, boundaries can be nested, non-overlapping, and frequently require translations. 


  3. Virtual Timeline: Most entities on the network rely on the NTP  for the actual timeline. With messages passed between distributed components of the storage, there is a provision for using sequence numbers as a virtual timeline. Together boundaries and virtual timeline enable spatial and temporal capture of the changes to the data suitable for resolving conflicts. Recording the virtual time with the help of a counter and using it for comparisons is one thing, reconstructing the event sequence is another. 


No comments:

Post a Comment