Inno 3.1 Protocols Flashcards
(65 cards)
What is TCP (Transmission Control Protocol)?
TCP is a connection-oriented protocol that ensures reliable, ordered, and error-checked delivery of data between applications.
It establishes a connection before transferring data and confirms delivery using acknowledgments. It’s widely used for applications where accuracy is critical, such as web pages, emails, and file transfers. TCP is slower than UDP but more reliable. Examples of protocols using TCP include HTTP, FTP, and SMTP.
RELIABLE, ORDERD, ERROR-CHECKED, CONNECTION
What is UDP (User Datagram Protocol)?
UDP is a connectionless protocol that sends data without guaranteeing delivery, order, or error correction. It is faster than TCP and is ideal for real-time applications like video streaming, gaming, and VoIP, where speed is more important than perfect accuracy. Because it doesn’t establish connections or wait for acknowledgments, it’s lightweight and low-latency. However, it is less reliable and can result in lost or out-of-order packets.
CONNECTIONLESS, NOT IN ORDER
What is SMTP (Simple Mail Transfer Protocol)?
SMTP is a protocol used for sending emails between servers. It works over TCP (usually port 25, 587, or 465 with SSL) and is responsible for the delivery of messages from a client to a mail server or between mail servers. SMTP is a push protocol — it only sends messages, not retrieves them. Email clients usually use it in combination with POP3 or IMAP for receiving mail.
MAIL, JUST SEND
What is FTP (File Transfer Protocol)?
FTP is a protocol used to transfer files between a client and server over a network. It operates over TCP (typically ports 20 and 21) and supports basic authentication with username and password.
FTP allows both uploading and downloading of files but transmits data in plain text, making it insecure by modern standards. For secure transfers, SFTP or FTPS is recommended.
SUPPORT BASIC AUTH, ALLOWS UPLOADING AND DOWNLOADING, PLAIN TEXT
What is SFTP (SSH File Transfer Protocol)?
A: SFTP is a secure file transfer protocol that operates over SSH (port 22). Unlike FTP, it encrypts both commands and data, protecting sensitive information during transmission. SFTP provides secure file access, transfer, and management functionalities. It is widely used in enterprise environments where data security is critical.
NOT A VERSION ON SFTP
SFTP is not a version of FTP—it is a completely separate protocol.
What is HTTP (Hypertext Transfer Protocol)?
HTTP is the foundation of data communication on the web, used to transmit web pages and APIs.
It is a stateless, request-response protocol running over TCP (usually port 80 or 443 for HTTPS). HTTP defines methods like GET, POST, PUT, and DELETE to interact with resources.
While simple and widely adopted, it is limited for real-time or bidirectional communication. HTTPS (HTTP Secure) adds encryption via TLS/SSL.
What are WebSockets?
A: WebSockets provide a full-duplex communication channel over a single TCP connection.
Unlike HTTP, which is request/response-based,
WebSockets allow both the client and server to send data anytime, making them ideal for real-time applications like chats, games, and live feeds.
They start as an HTTP connection and then upgrade to the WebSocket protocol.
WebSockets are more efficient for frequent, lightweight messaging compared to repeated HTTP requests.
SEND DATA ANY TIME
What is gRPC?
gRPC is a high-performance, open-source RPC (Remote Procedure Call) framework developed by Google.
It uses HTTP/2 as its transport protocol and Protocol Buffers (protobuf) as the interface definition language and message format.
gRPC enables client-server communication in a more efficient, strongly-typed, and language-agnostic way. It supports streaming, bi-directional communication, and is ideal for microservices. Compared to REST, gRPC is more compact and faster.
PROTOBUFFS AS INTERFACE DEFINITION LANGUAGE
What is AMQP (Advanced Message Queuing Protocol)?
AMQP is a protocol designed for message-oriented middleware, enabling secure and reliable communication between distributed systems.
It supports features like message queuing, routing, publish/subscribe, and delivery acknowledgments.
AMQP is used in brokers like RabbitMQ and is ideal for enterprise messaging and decoupled architectures. It ensures messages are not lost and can be processed even if the receiver is temporarily offline.
What is MQTT (Message Queuing Telemetry Transport)?
MQTT is a lightweight messaging protocol designed for constrained devices and low-bandwidth, high-latency networks. It follows a publish/subscribe model and is commonly used in IoT (Internet of Things) scenarios.
MQTT is optimized for small payloads and power efficiency, making it ideal for sensors, smart home devices, and mobile applications. It uses TCP (typically port 1883) and supports persistent sessions and QoS levels.
SMALL PAYLOAD, POWER EFFICIENCY
What are the main differences between TCP and UDP?
TCP is connection-oriented, reliable, and ensures data arrives in order, making it suitable for web, email, and file transfer. UDP is connectionless, faster, and does not guarantee delivery or order, making it ideal for real-time applications like video calls or gaming.
In which scenarios would you prefer UDP over TCP?
You would prefer UDP in real-time applications such as video streaming, VoIP, or online gaming, where speed and low latency are more important than perfect reliability or packet order.
How does SFTP differ from FTP?
SFTP uses SSH for encryption and operates on a single secure connection (usually port 22), while FTP transmits data in plain text and requires separate control and data channels. SFTP is much more secure and modern.
Why is HTTP considered a stateless protocol?
Because each HTTP request is independent — the server does not retain any information about previous requests. Any necessary state (like sessions) must be maintained client-side (e.g., via cookies or tokens).
How do WebSockets improve upon HTTP for real-time communication?
WebSockets provide a persistent, bidirectional communication channel over a single TCP connection, eliminating the need for repeated requests (polling).
This reduces latency and overhead for real-time updates like chat, notifications, or dashboards.
What are some use cases where gRPC is more suitable than REST?
gRPC is more efficient for microservices, internal service-to-service communication, and performance-critical applications due to its support for binary format, streaming, and strong typing with Protocol Buffers.
BINARY FORMAT AND STRONG TYPING WITH PROTOCOL BUFFERS
What is the role of a message broker in protocols like AMQP and MQTT?
The broker handles routing, queuing, and delivering messages between publishers and subscribers.
It enables decoupling of services and ensures reliable communication even if consumers are temporarily offline.
How does MQTT ensure lightweight communication for IoT devices?
MQTT minimizes bandwidth usage with small headers, uses TCP for stability, and allows clients to subscribe to only the topics they care about. It also supports different Quality of Service (QoS) levels for message delivery guarantees.
What does it mean that AMQP supports message acknowledgments?
AMQP allows consumers to confirm when messages are successfully processed. If a message is not acknowledged, the broker can re-deliver it, ensuring reliability in communication.
What is a common security risk with FTP, and how can it be mitigated?
FTP transmits data and credentials in plain text, making it vulnerable to interception. This can be mitigated by using secure alternatives like SFTP or FTPS, which encrypt communication.
How does gRPC handle communication efficiency compared to REST?
gRPC uses HTTP/2 for multiplexed streams and binary serialization (Protocol Buffers), making it significantly more efficient in terms of speed and payload size than REST with JSON over HTTP/1.1.
What transport protocol is used by WebSockets and MQTT?
Both WebSockets and MQTT use TCP as their transport protocol, ensuring reliable delivery of messages.
What is the difference between push and pull models in messaging protocols?
A: In a push model (like SMTP), the sender initiates the message delivery. In a pull model (like POP3/IMAP), the receiver fetches messages. Publish/subscribe protocols like MQTT allow for event-driven communication where messages are pushed to all subscribers of a topic.
Which port does HTTP and HTTPS use by default?
HTTP uses port 80 by default, while HTTPS (secured with TLS/SSL) uses port 443.