-
-
Notifications
You must be signed in to change notification settings - Fork 692
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add protocol concepts doc (#1013)
Co-authored-by: Alejandra Quetzalli <[email protected]>
- Loading branch information
1 parent
05f0514
commit 02a1a6d
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: Protocol | ||
weight: 25 | ||
--- | ||
|
||
|
||
## What is a protocol? | ||
A protocol is a set of rules that specifies how information is exchanged between applications and/or servers. | ||
|
||
Protocol examples: | ||
* [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) | ||
* [HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP) | ||
* [Kafka](https://kafka.apache.org/) | ||
* [MQTT](https://mqtt.org/) | ||
|
||
## Why do we need protocols? | ||
Whenever a producer detects a state change (events) and publishes those events as messages, a protocol carries those messages to the channel and then to a consumer. Protocol plays a vital role in message transmission. | ||
|
||
```mermaid | ||
sequenceDiagram | ||
Publisher->>+Broker: PUBLISH(QoS0,Msg) | ||
Broker->>+Subscriber: PUBLISH(QoS0,Msg) | ||
Publisher->>+Publisher: Delete(Msg) | ||
``` | ||
|
||
The diagram above depicts the message exchange flow from `producer` to `broker` to `consumer` using the MQTT protocol with QoS0 (quality of service 0). This means that information exchanged from `producer` to `broker` to `consumer` is delivered at most once. | ||
|
||
The quality of service information rule is specified on a protocol level. Broker implementations and other involved actors must act accordingly. | ||
|
||
In AsyncAPI documents, all protocol-specific details that the application follows can be described using [bindings](/docs/reference/specification/v2.5.0#definitionsBindings). | ||
|
||
<DocsButton | ||
suggestions={[ | ||
{ | ||
href:'/docs/concepts/application', | ||
type: 'back', | ||
title: 'Application', | ||
}, | ||
{ | ||
href:'/docs/tutorials', | ||
type: 'next', | ||
title: 'Tutorials - Overview', | ||
} | ||
]} | ||
/> |