Protocols and standards on the web: Difference between revisions

From Computer Science Wiki
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[file:network.png|right|frame|Networks<ref>http://www.flaticon.com/</ref>]]
[[file:network.png|right|frame|Networks<ref>http://www.flaticon.com/</ref>]]


In telecommunications, a communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any kind of variation of a physical quantity. These are the rules or standard that defines the syntax, semantics and synchronization of communication and possible error recovery methods. Protocols may be implemented by hardware, software, or a combination of both.
'''In telecommunications, a communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any kind of variation of a physical quantity.''' These are the rules or standard that defines the syntax, semantics and synchronization of communication and possible error recovery methods. Protocols may be implemented by hardware, software, or a combination of both.


Communicating systems use well-defined formats (protocol) for exchanging messages. Each message has an exact meaning intended to elicit a response from a range of possible responses pre-determined for that particular situation. <ref>https://en.wikipedia.org/wiki/Communications_protocol</ref>
Communicating systems use well-defined formats (protocol) for exchanging messages. Each message has an exact meaning intended to elicit a response from a range of possible responses pre-determined for that particular situation. <ref>https://en.wikipedia.org/wiki/Communications_protocol</ref>


Standards are guidelines, these are more abstract. You can have products that meet the standard, exceed the standard or below a certain standard.


== Big ideas in networking ==
Protocols are rules. They define exactly how data is exchanged and the expected behavior. These are rules you must follow exactly or your device will not be able to communicate at all with other devices. You can not exceed the protocol but its possible that you do not implement all the features of the protocols or you may implement the protocol completely.<ref>https://www.quora.com/What-is-the-difference-between-protocol-and-standard</ref>


* [[OSI model]]
== Network protocols ==
* [[Networking hardware]]
 
* [[Types of networks]]
This video is very technical, but one of the best I could find about network protocols. It may be helpful to review the [[OSI model]] prior to watching this.
* [[Network standards]]
 
* [[Network layers]]
<html>
* [[VPN]]
<iframe width="560" height="315" src="https://www.youtube.com/embed/QrNnRJqTMO8" frameborder="0" allowfullscreen></iframe>
* [[Network Protocols]]
</html>
* [[Data packet]]
 
* [[Network speed]]
== IP protocol ==
* [[Network data compression]]
 
* [[Transmission medium]]
* What is the IP protocol: [https://www.youtube.com/watch?v=rPoalUa4m8E Click here to watch a video]
* [[Packet switching]]
 
* [[Wireless networks]]
Some characteristics of IP are <ref>http://waksudir.blogspot.com/2015/03/characteristics-of-ip-protocol.html</ref>:
* [[Network security]]
 
* [[Mobile networks]]
* Connectionless - No connection with the destination is established before sending data packets.
* Best Effort (unreliable) - Packet delivery is not guaranteed.
* Media Independent - Operation is independent of the medium carrying the data.
 
== TCP protocol ==
 
* What is the TCP protocol: [https://www.youtube.com/watch?v=4IMc3CaMhyY Click here to watch a video]
* Please watch this part 2: [https://www.youtube.com/watch?v=F27PLin3TV0&index=13&list=PLowKtXNTBypH19whXTVoG3oKSuOcw_XeW part 2 of TCP]
 
For a practical hands-on look at open TCP connections on your Mac, type the following command in terminal:
lsof -i | grep -E "(LISTEN|ESTABLISHED)"
 
and also:
 
nettop (push "c" and "e" and "p" for different views)
 
Characteristics of TCP are <ref>http://www.omnisecu.com/tcpip/transmission-control-protocol-tcp.php</ref>:
 
* Stream Data transfer: Applications working at the Application Layer transfers a contiguous stream of bytes to the bottom layers. It is the duty of TCP to pack this byte stream to packets, known as TCP segments, which are passed to the IP layer for transmission to the destination device. The application does not have to bother to chop the byte stream data packets.
 
* Reliability: The most important feature of TCP is reliable data delivery. In order to provide reliability, TCP must recover from data that is damaged, lost, duplicated, or delivered out of order by the Network Layer. TCP assigns a sequence number to each byte transmitted, and expects a positive acknowledgment (ACK) from the receiving TCP layer. If the ACK is not received within a timeout interval, the data is retransmitted. The receiving TCP uses the sequence numbers to rearrange the TCP segments when they arrive out of order, and to eliminate duplicate TCP segments.
 
* Flow control: Network devices operate at different data rates because of various factors like CPU and available bandwidth. It may happen a sending device to send data at a much faster rate than the receiver can handle. TCP uses a sliding window mechanism for implementing flow control. The number assigned to a segment is called the sequence number and this numbering is actually done at the byte level. The TCP at the receiving device, when sending an ACK back to the sender, also indicates to the TCP at the sending device, the number of bytes it can receive (beyond the last received TCP segment) without causing serious problems in its internal buffers.
 
* Multiplexing: Multitasking achieved through the use of port numbers.
 
* Connections: Before application processes can send data by using TCP, the devices must establish a connection. The connections are made between the port numbers of the sender and the receiver devices. A TCP connection identifies the end points involved in the connection. A socket number is a combination of IP address and port number, which can uniquely identify a connection.
 
* Full duplex: TCP provides for concurrent data streams in both directions
 
=== A deeper dive ===
This video is a little on the dry side, but the level of detail is excellent:
 
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/0s_w8eHu6LQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</html>
 
== Explain the importance of protocols ==
 
Without protocols and standards we wouldn't be able to achieve interoperability. That is, if my website used a totally different protocol for storing data (non-html) your browser would not be able to parse it, and you as a user wouldn't be able to understand it.
 
Protocols are important because they:
 
* Ensure '''data integrity''' (overall completeness, accuracy and consistency of data<ref>https://www.techopedia.com/definition/27858/data-integrity-networking</ref>)
* Regulate '''flow control''' (In data communications, flow control is the process of managing the rate of data transmission between two nodes to prevent a fast sender from overwhelming a slow receiver.<ref>https://en.wikipedia.org/wiki/Flow_control_(data)</ref>)
* Manage '''deadlock''' (A condition that occurs when two processes are each waiting for the other to complete before proceeding <ref>https://www.webopedia.com/TERM/D/deadlock.html</ref>)
* Manage '''congestion''' (Network congestion in data networking is the reduced quality of service that occurs when a network node or link is carrying more data than it can handle.<ref>https://en.wikipedia.org/wiki/Network_congestion</ref>)
* Manage  '''error checking''' (techniques that enable reliable delivery of digital data over unreliable communication channels.<ref>https://en.wikipedia.org/wiki/Error_detection_and_correction</ref>)


== What do you actually NEED to know? ==  
== Why standards are important ==  


There are certain standards you must know in order to complete IB diploma. These are not fully complete, in my opinion, but they are here for your reference:
Value of Creating Standards at W3C<ref>https://www.w3.org/standards/about.html</ref> W3C continues to evolve to provide the community a productive environment for creating Web standards. W3C standards:


* [[3.1.7 Explain why protocols are necessary]] - [[Level 3]]
* are created following a consensus-based decision process;
* consider aspects of accessibility, privacy, security, and internationalization;
* reflect the views of diverse industries and global stakeholders;
* balance speed, fairness, public accountability, and quality;
* benefit from Royalty-Free patent licensing commitments from participants;
* are stable (and W3C seeks to ensure their persistence at the published URI);
* benefit from wide review from groups inside and outside W3C;
* are downloadable at no cost;
* are maintained in a predictable fashion;
* are strengthened through interoperability testing;


== Do you understand this topic? ==  
== Do you understand this topic? ==  
You should be able to:


* Define protocol
<html>
<iframe src="https://assess.computersciencelearning.org/h5p/41/embed" width="846" height="231" frameborder="0" allowfullscreen="allowfullscreen"></iframe><script src="https://assess.computersciencelearning.org/modules/h5p/vendor/h5p/h5p-core/js/h5p-resizer.js" charset="UTF-8"></script>
</html>
 
If you are still stuck, you may want to [https://discuss.computersciencewiki.org/ '''ask a question on our discussion board'''].
 
== Do you have an advanced understanding about this topic? ==
 
* Define data integrity
* Define data integrity
* Define source integrity
* Define source integrity
Line 42: Line 105:
* Define error checking
* Define error checking


* Explain the importance of networking protocols
== See Also ==
 
* [[OSI model]]


== Do you have an advanced understanding about this topic? ==
== Standards ==
These standards are used from the IB Computer Science Subject Guide<ref>IB Diploma Programme Computer science guide (first examinations 2014). Cardiff, Wales, United Kingdom: International Baccalaureate Organization. January 2012.</ref>


== Resources ==
* Explain the importance of protocols and standards on the web.
* Explain why protocols are necessary.


* [http://www.teachcomputing.net/gcse/edexcel/networks.html an excellent introduction to networks]
== References ==
== References ==
<references />
<references />

Revision as of 20:46, 1 March 2020

Networks[1]

In telecommunications, a communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any kind of variation of a physical quantity. These are the rules or standard that defines the syntax, semantics and synchronization of communication and possible error recovery methods. Protocols may be implemented by hardware, software, or a combination of both.

Communicating systems use well-defined formats (protocol) for exchanging messages. Each message has an exact meaning intended to elicit a response from a range of possible responses pre-determined for that particular situation. [2]

Standards are guidelines, these are more abstract. You can have products that meet the standard, exceed the standard or below a certain standard.

Protocols are rules. They define exactly how data is exchanged and the expected behavior. These are rules you must follow exactly or your device will not be able to communicate at all with other devices. You can not exceed the protocol but its possible that you do not implement all the features of the protocols or you may implement the protocol completely.[3]

Network protocols[edit]

This video is very technical, but one of the best I could find about network protocols. It may be helpful to review the OSI model prior to watching this.

IP protocol[edit]

Some characteristics of IP are [4]:

  • Connectionless - No connection with the destination is established before sending data packets.
  • Best Effort (unreliable) - Packet delivery is not guaranteed.
  • Media Independent - Operation is independent of the medium carrying the data.

TCP protocol[edit]

For a practical hands-on look at open TCP connections on your Mac, type the following command in terminal:

lsof -i | grep -E "(LISTEN|ESTABLISHED)"

and also:

nettop (push "c" and "e" and "p" for different views)

Characteristics of TCP are [5]:

  • Stream Data transfer: Applications working at the Application Layer transfers a contiguous stream of bytes to the bottom layers. It is the duty of TCP to pack this byte stream to packets, known as TCP segments, which are passed to the IP layer for transmission to the destination device. The application does not have to bother to chop the byte stream data packets.
  • Reliability: The most important feature of TCP is reliable data delivery. In order to provide reliability, TCP must recover from data that is damaged, lost, duplicated, or delivered out of order by the Network Layer. TCP assigns a sequence number to each byte transmitted, and expects a positive acknowledgment (ACK) from the receiving TCP layer. If the ACK is not received within a timeout interval, the data is retransmitted. The receiving TCP uses the sequence numbers to rearrange the TCP segments when they arrive out of order, and to eliminate duplicate TCP segments.
  • Flow control: Network devices operate at different data rates because of various factors like CPU and available bandwidth. It may happen a sending device to send data at a much faster rate than the receiver can handle. TCP uses a sliding window mechanism for implementing flow control. The number assigned to a segment is called the sequence number and this numbering is actually done at the byte level. The TCP at the receiving device, when sending an ACK back to the sender, also indicates to the TCP at the sending device, the number of bytes it can receive (beyond the last received TCP segment) without causing serious problems in its internal buffers.
  • Multiplexing: Multitasking achieved through the use of port numbers.
  • Connections: Before application processes can send data by using TCP, the devices must establish a connection. The connections are made between the port numbers of the sender and the receiver devices. A TCP connection identifies the end points involved in the connection. A socket number is a combination of IP address and port number, which can uniquely identify a connection.
  • Full duplex: TCP provides for concurrent data streams in both directions

A deeper dive[edit]

This video is a little on the dry side, but the level of detail is excellent:

Explain the importance of protocols[edit]

Without protocols and standards we wouldn't be able to achieve interoperability. That is, if my website used a totally different protocol for storing data (non-html) your browser would not be able to parse it, and you as a user wouldn't be able to understand it.

Protocols are important because they:

  • Ensure data integrity (overall completeness, accuracy and consistency of data[6])
  • Regulate flow control (In data communications, flow control is the process of managing the rate of data transmission between two nodes to prevent a fast sender from overwhelming a slow receiver.[7])
  • Manage deadlock (A condition that occurs when two processes are each waiting for the other to complete before proceeding [8])
  • Manage congestion (Network congestion in data networking is the reduced quality of service that occurs when a network node or link is carrying more data than it can handle.[9])
  • Manage error checking (techniques that enable reliable delivery of digital data over unreliable communication channels.[10])

Why standards are important[edit]

Value of Creating Standards at W3C[11] W3C continues to evolve to provide the community a productive environment for creating Web standards. W3C standards:

  • are created following a consensus-based decision process;
  • consider aspects of accessibility, privacy, security, and internationalization;
  • reflect the views of diverse industries and global stakeholders;
  • balance speed, fairness, public accountability, and quality;
  • benefit from Royalty-Free patent licensing commitments from participants;
  • are stable (and W3C seeks to ensure their persistence at the published URI);
  • benefit from wide review from groups inside and outside W3C;
  • are downloadable at no cost;
  • are maintained in a predictable fashion;
  • are strengthened through interoperability testing;

Do you understand this topic?[edit]

If you are still stuck, you may want to ask a question on our discussion board.

Do you have an advanced understanding about this topic?[edit]

  • Define data integrity
  • Define source integrity
  • Define flow control
  • Define deadlock
  • Define congestion management
  • Define error correction
  • Define error checking

See Also[edit]

Standards[edit]

These standards are used from the IB Computer Science Subject Guide[12]

  • Explain the importance of protocols and standards on the web.
  • Explain why protocols are necessary.

References[edit]