Sunday, 29 March 2020

Muscle anatomy | Shoulder | Fit with Shubham -1






Which includes: 
  1. Shoulder
    1. Delts:
      1. Front 
      2. Lateral
      3. Rear
    2. There are five more muscles, see in the last section.
  2. Traps, yes traps. We usually train our traps with shoulders.


Delts muscle is this:


Traps is this:




Let’s dig down deep now:

Shoulder muscle anatomy:

  1. Deltoid:


Three parts of deltoid muscle:
  1. Anterior (also called as front delts)
    1. Clavicular part
  2. Posterior
    1. Acromial part (lateral or side delts)
    2. Scapular spine part (rear delts)

  1. Clavicular part (anterior )
  2. Acromial (posterior) 
  3. Scapular








For more detail:

To understand the rest of the muscles, let's remove the large deltoid muscle:


This will be something like this:

There are five muscles here for us to consider:
  1. Four of which belong to Rotator Cuff Muscles that also  support the shoulder joint.
    1. Subscapularis Muscle
    2. Infraspinatus
    3. Teres minor
    4. Supraspinatus
  2. Teres major


1.a  Subscapularis Muscle
1.b


1.c 

1.d


2.














Note: This blog is just for the knowledge purpose. For any other reason, take medical advice from real doctors instead.

Saturday, 28 March 2020

HTTP3: Good or bad

HTTP/3 (QUIC):
Before discussing HTTP/3 , first understand problem with http/2. One of the most notable issue is the fact that the single connection of HTTP/2 ends up being a bottleneck for data in a low network quality environment — as network quality degrades, and packets are dropped, the single connection slows the entire process down, and no additional data can be transferred during this time of retransmission.
To solve the underlying issues of HTTP/2, HTTP/3 is based around QUIC. QUIC, once an acronym for the “Quick UDP Interaction Connections,” was built by Google as a solution to many of the issues intrinsic in the current network protocol stack. It is low-latency by design. The protocol has also been designed to be secure — because there is no cleartext version of the protocol.


QUIC is using all HTTP/2 best features like multiplexing , stream , server push , header compression QPACK(new version of HPACK) etc .
The HPACK algorithm depends on an ordered delivery of streams so it was not possible to reuse it for HTTP/3 without modifications since QUIC offers streams that can be delivered out of order. QPACK can be seen as the QUIC-adapted version of HPACK.
QUIC is using UDP as underlying protocol. UDP is much faster than TCP because UDP is connectionless and there is no error recovery attempt in case of packet loss. TCP need minimum 2 round trip to establish connection between client and server and If you use TLS then round trip would be 6. UDP is using only 0–1 (0-RTT and 1-RTT (Round Trip Time) handshakes)round trip because it is connectionless . TCP is heavy-weight. TCP requires three packets to set up a socket connection, before any user data can be sent. TCP handles reliability and congestion control.UDP is lightweight. There is no ordering of messages, no tracking connections, etc. It is a small transport layer designed on top of IP.




Additionally, the fact that QUIC has been developed for implementation in the user space is also notable. This means that, unlike protocols built into the OS or firmware level, QUIC can iterate rather quickly and effectively without having to deal with the entrenchment of each protocol version



Why QUIC

QUIC is a name, not an acronym. It is pronounced exactly like the English word "quick".
QUIC is in many ways what could be seen as a way of doing a new reliable and secure transport protocol that is suitable for a protocol like HTTP and that can address some of the known shortcomings of doing HTTP/2 over TCP and TLS. The logical next step in the web transport evolution.
QUIC is not limited to just transporting HTTP. The desire to make the web and data in general delivered faster to end users is probably the largest reason and push that initially triggered the creation of this new transport protocol.



HTTP/3 Prioritization

One of the HTTP/3 stream frames is called PRIORITY. It is used to set priority and dependency on a stream in a way similar to how it works in HTTP/2.
The frame can set a specific stream to depend on another specific stream and it can set a "weight" on a given stream.
A dependent stream should only be allocated resources if either all of the streams that it depends on are closed or it is not possible to make progress on them.
A stream weight is value between 1 and 256 and it is specified that streams with the same parent should be allocated resources proportionally based on their weight.
Spinning a bit
Both endpoints, the client and the server, maintain a spin value, 0 or 1, for each QUIC connection, and they set the spin bit on packets it sends for that connection to the appropriate value.
Both sides then send out packets with that spin bit set to the same value for as long as one round trip lasts and then it toggles the value. The effect is then a pulse of ones and zeroes in that bitfield that observers can monitor.
This measuring only works when the sender is neither application nor flow control limited and packet reordering over the network can also make the data noisy.


To reduce the time required to establish a new connection, a client that has previously connected to a server may cache certain parameters from that connection and subsequently set up a 0-RTT connection with the server. This allows the client to send data immediately, without waiting for a handshake to complete.




Src:

Monday, 23 March 2020

Understanding network communication - Phase 2 - TCP IP model

TCP IP Model

TCP model introduced prior to OSI model.
Besides this, OSI model is just a reference model

Application Layer (Application Layer + Presentation  Layer + Session Layer)
Transport Layer 
Internet Layer (Network Layer)
Network Access (Data link Layer + Physical Layer )







  • Application Layer
    • HTTP[s], DNS,  DHCP, FTP
    • Representing the data to user, encoding, compression
  • Transport Layer
    • TCP UDP
    • Process to process communication
  • Internet Layer 
    • IPv4, IPv6
    • Determines the best path via Routing
    • Routing
  • Network Access Layer
    • Data into signal, carry over to media, read it back from media.
    • PPP (point to point), Frame Relay, Ethernet
PDP - Stands for "Protocol Data Unit." A PDU is a specific block of information transferred over a network. It is often used in reference to the OSI model, since it describes the different types of data that are transferred from each layer.

  • Application Layer
    • In Application layer, PDU is Data 
    • The data which is actually being transmitted by the application
  • Transport Layer
    • PDU here is Segment
  • Internet Layer 
    • PDU here is Packet
  • Network Access Layer
    • PDU here is Frame
  • Physical Layer
    • PDU here is bits

Sunday, 22 March 2020

Understanding network communication - Phase 1 - OSI model



OSI model
  • Open system interconnection model
  • Communication between two computers connected through a cable and RJ connectors.
  • Each layer is a package of protocols
    • The app layer is not the application itself, but the protocols packages.
  • 7 Layer model
  • Application Layer: Uses protocols to access net
  • Presentation Layer: Convert text/audio/video into binary
  • Session Layer: Establishes the connection
  • Transport  Layer: Converts into segments and adds port number and sequence number into each segment.
  • Network  Layer: Convert segments into packets by adding logical address
  • Data link  Layer: Converts packets into frame by adding physical address
  • Physical  Layer: Transmits the data by converting into signals
    • Application layer
      • Is used by applications that use the internet like Google chrome, skype.
      • Application layer provides services to network applications with the help of protocols to perform user activities.
      • Protocols: HTTP /HTTPS (Web surfing), FTP (File transfer), NFS, DHCP, SMTP (Emails), TELNET (Virtual terminal), POP3, IRC, NNTP 

    • Presentation layer:
      • ASCII => EBCDIC ( Extended Binary Coded Decimal Interchange Code) 
      • It does:
        • Translation:Receives Data from Application layer. In the form of characters and number and convert it into binary format. 
        • Compression
          • Compression can be lossy and lossless.
          • Reducing the amount to transfer, hence good choice for real time streaming.
        • Data encryption using SSL (Secure socket layer).

    • Session Layer:
      • Just like party planners and helpers, Session layers has its own helpers, Called APIs. NETBIOS (Network basic input output system) is an example of \API which helps application running on different computers to connect with each other.
      • Process:
        • Before establishing a connection with the server, the server does the authentication(to check who you are) by using the username and password provided.
        • Post authentication, user’s authorization(If you have the access to sess the desired resource) is checked.
        • Session management
YOUR WEB BROWSER DOES ALL THE OPERATION OF “SESSION, PRESENTATION AND APPLICATION LAYER”
    • Transport layer:
      • Duties:
        • Segmentation
        • Flow control
        • Error control
        • Connection and connection less transmission
      • Reliability of communication through 
        • Segmentation
          • Breaks the received from session layer into smaller segments.
            • Segments
              • Contains: Source port, destination port and a sequence number
        • Flow: Amount of data being transmitted
          • To prevent loss of any packet.
        • Error control
          • Retransmitted the lost/ corrupted data.
          • Checksum is added to each packet.
        • Protocols:
          • TCP | UDP
        • Types of services:
          • Connection - TCP
          • Connection less  - UDP 
        • UDP is faster, as it does not provide any feedback so that lost data can be retransmitted.
        • Udp is used weather we don’t care about delivery of old data like online movie streaming, songs, games, DNS, PFTP.
        • TCP is used where delivery of old data is must, eg. WWW, email, FTP.
TRANSPORT LAYER passes the data segments to NETWORK LAYER
    • Network layer 
      • Works for the transmission of data segments from one computer to another located in a diff network.
      • Data send is called as packets.
      • It’s the layer where the routes determines.
      • Duties
        • Routing
          • Method to move data packet from source to destination based on the logical IP and mask
        • Logical addressing - IP addressing.
          • Network layer assigns receiver’s and sender’s IP address to each segment to form a IP packet
        • Path determination
          • A computer can be connected to the internet server in a no of ways. Choosing the best path is called Path determination.
          • Procols:
            • OSPTF:  Open shortest path fast
            • BGP: Border gateway protocol
            • IS - IS: intermediate system to intermediate system
NETWORK LAYER passes the data packets to DATA LINK LAYER
    • Data link:
      • Two kind of addressing
        • Logical addressing: Done at Network layer. This is assigning of IP address of the sender and the receiver.
        • Physical addressing: Done at data link layer. Mac address(12 digits alphanumeric address embedded in Network interface card by the computer manufacturer) of receiver and sender assigned to data packet. 
      • Data you read in Data link layer is FRAME.
      • Data packet → [IP1  IP2 |Segment | TAIL]
      • Frame → [MAC1 MAC2 | Packet ]  which is
        [MAC1 MAC2 | IP1 IP2 | Segment | TAIL ]
      • Data link layer is embedded as a software in the Network interface card of a computer and provides means to transfer data from one comp to another via local media (copper wire, fiber or air for radio signals).
      • NIC (sender) -----------(MEDIA like copper wire, fiber or air) ------------------ NIC (receiver)
      • Two duties: (Fig 1)
        • 1.  Allows upper layer of OSI model to access media using techniques such as framing


        • 2. Controls how data is passed and received from the media using techniques:
          • Media Access Control
            • The technique use to get the frame on the media OR of the media
          • Error Detection 
    • Physical Layer:
      • Transmite the Frame passed by the Data link layer to signals. 
        • Type of signals:
          • Electrical: copper of lan
          • Light: in case of fiber
          • Radio: in case of air


But why we don't use OSI model? 

OSI is actually not an implementation but a concept model or references, TCP just implement the layer 4 (transport layer) of it. When we implement a communication protocol, we often make decision of which layer in OSI should be implemented, and you can merge some layer together.

Here is a example when we design a new communication system:

First, we will define which kind of physical media we need, e.g. differential signal, or TTL, and how long distance it can transmit, i.e. Physical Layer (OSI Layer 1).
Second, we need addressing linked devices, so a device knows what data should be received or just bypass, i.e. Data Link Layer (OSI Layer 2).
Third, if data don’t needs to be routed cross networks, we can just put Application Data on it (OSI Layer 6-7). Or if it should be routed across networks, we define a routable protocol e.g. IP or any else custom protocols you like (OSI Layer 3).
Forth, now, you may be concerned about data consistency, sequences, validate, traffic control, so you implement the TCP protocol to keep your data safe. i.e. Transport Layer (OSI Layer 4)
Fifth, your customer never want to make their communication be seen by others, so you would give them something (e.g. a token, certification..) to distinguish each customer, make sure you making a private conversation. i.e. Session Layer (OSI Layer 5)
Sixth, data format defined at Presentation Layer, so your system know how to decode/encode your data. (OSI Layer 6)
Last, your actual data here. Application Layer (OSI Layer 7).
So, OSI defined what things you need to concern in a communication system, but you can choose not to.

3.4k views · View Upvoters
Srcs: