Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added short doc about bonding #1117

Merged

Conversation

ethouris
Copy link
Collaborator

@ethouris ethouris commented Feb 4, 2020

No description provided.

@ethouris ethouris added Type: Enhancement Indicates new feature requests [docs] Area: Improvements or additions to documentation labels Feb 4, 2020
@maxsharabayko maxsharabayko added this to the v1.5.0 milestone Feb 14, 2020
@maxsharabayko maxsharabayko mentioned this pull request Feb 14, 2020
33 tasks
@maxsharabayko maxsharabayko merged commit f00086d into Haivision:master Feb 26, 2020
@@ -0,0 +1,255 @@
What are groups
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are groups?

Comment on lines +4 to +9
A Group is an entity that binds multiple sockets and it is required to
establish a "bonded connection". Groups can be then used the same way as
sockets for performing a transmission. It is then in general stated that a
group is connected as long as at least one member-socket connection is alive,
and as long as this state lasts, some member connections may get broken and
new member connections can be established.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A Group is an entity that binds multiple sockets, and is required to
establish a "bonded connection". Groups can be used in the same way as
sockets for performing a transmission. A group is connected as long as at
least one member-socket connection is alive. As long as a group is in the
connected state, some member connections may be broken and
new member connections can be established.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"may get broken" was written intentionally. The point is that they can transit from "connected" to "broken" (previously alive connections may break at some point).

Comment on lines +11 to +18
Groups are fully flexible. There's no limitation how many single connections
they can use as well as when you want to establish a new connection. On the
other hand, broken connections are not automatically reestablished. The
application should track the existing connections and reestablish broken ones
if needed. But then, the application is also free to keep as many links as it
wants, including adding new links to the group while it is being used for
transmission, or removing links from the list if they are not to be further
used.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Groups are flexible. There's no limitation on how many single connections
they can use, or on establishing new connections. Broken connections,
however, are not automatically reestablished. The application should
track existing connections and reestablish broken ones if needed.
The application is free to keep as many links as it wants. It can
add new links to a group while it is being used for transmission, or
remove links from the list if they are no longer needed.

Comment on lines +20 to +22
How the links are exactly utilized within the group, it depends on the group
type. The simplest type, broadcast, utilizes all links at a time to send the
same data.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How links are utilized within a group depends on the group type.
The simplest type, broadcast, utilizes all links at once to send the
same data.

same data.


Lay-ground: using sockets for establishing a connection
Copy link
Collaborator

@stevomatthews stevomatthews Feb 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder: Using sockets for establishing a connection

Important changes
-----------------

Note important changes SRT underwent since the first version from UDT:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind these important changes to SRT:

Comment on lines +33 to +38
1. Specifying family (`AF_INET/AF_INET6`) when creating a socket is no longer
required. The existing `srt_socket` function redirects to a new
`srt_create_socket` function that gets no arguments. The exact family is
decided at the first call to `srt_bind` or `srt_connect` and it's extracted
from the value of `sa_family` field of the `sockaddr` structure passed to
this call.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Specifying a family (AF_INET/AF_INET6) when creating a socket is no longer
    required. The existing srt_socket function redirects to a new
    srt_create_socket function that takes no arguments. The family is
    decided at the first call to srt_bind or srt_connect, and is extracted
    from the value of the sa_family field of the sockaddr structure passed to
    this call.

Socket connection
-----------------

Let's review quickly what you do to establish a socket connection in the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's review quickly how to establish a socket connection in the

Comment on lines +103 to +106
Except for several details, most of the API used for sockets can be used for
groups. The groups also have the numeric identifiers, just like sockets, which
are in the same domain as sockets, except that there's reserved one bit to
mark that the identifier is for a group, bound to a `SRTGROUP_MASK` symbol.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for several details, most of the API used for sockets can be used for
groups. Groups also have numeric identifiers, just like sockets, which
are in the same domain as sockets, except that there is one bit reserved to
indicate that the identifier is for a group, bound to a SRTGROUP_MASK symbol.

Comment on lines +108 to +113
IMPORTANT: Usually you'll be establishing multiple connections between two
endpoints, just using a different network path - otherwise this simply doesn't
make sense. The simplest method to achieve it is to have multiple network
devices bound to different providers - but still, the listener must bind to
one exactly port using 0.0.0.0 IP, that is, every device in the system. The
goal is to reach this listening point through different target addresses.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMPORTANT: Usually you'll be establishing multiple connections between two
endpoints, just using a different network path. The simplest method to is to
have multiple network devices bound to different providers. Still, the listener
must bind to exactly one port using the 0.0.0.0 IP (i.e. every device in the system). The
goal is to reach this listening point through different target addresses.

srt_connect(conngrp, &sa2, sizeof sa2);
```

HOWEVER, this method can be so easily used in non-blocking mode, as here
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMPORTANT: This method can be easily used in non-blocking mode, as you

```

HOWEVER, this method can be so easily used in non-blocking mode, as here
you don't have to wait for the connection to be established. If you do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't have to wait for the connection to be established. If you do

@mbakholdina mbakholdina modified the milestones: v1.5.0, v1.4.2 Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[docs] Area: Improvements or additions to documentation Type: Enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants