Skip to content
This repository was archived by the owner on Oct 24, 2022. It is now read-only.

Conversation

thiblahute
Copy link
Contributor

See commit messages.

Includes #73 to avoid conflicts

@thiblahute thiblahute force-pushed the singlesocket branch 2 times, most recently from b6accb2 to b41b006 Compare July 15, 2022 17:30
@MathieuDuponchelle
Copy link
Collaborator

Can you edit the MR to remove the metadata commit?

@thiblahute
Copy link
Contributor Author

Can you edit the MR to remove the metadata commit?

It would be a loss of time :-)

@thiblahute thiblahute force-pushed the singlesocket branch 2 times, most recently from d6a3256 to 462a27e Compare July 27, 2022 13:31
@MathieuDuponchelle
Copy link
Collaborator

It would be a loss of time :-)

Then don't propose before the other MR has been merged, that's also a waste of time ;)

@thiblahute thiblahute force-pushed the singlesocket branch 2 times, most recently from 497bc53 to 6adcdd5 Compare July 27, 2022 15:15
@thiblahute
Copy link
Contributor Author

It would be a loss of time :-)

Then don't propose before the other MR has been merged, that's also a waste of time ;)

Well skipping the commit while reviewing isn't that hard ;)

@MathieuDuponchelle
Copy link
Collaborator

Well skipping the commit while reviewing isn't that hard ;)

I'm not reviewing per-commit on github, comments there have a bad tendency to disappear on force push ..

@thiblahute
Copy link
Contributor Author

Well skipping the commit while reviewing isn't that hard ;)

I'm not reviewing per-commit on github, comments there have a bad tendency to disappear on force push ..

Let's move it all to gst-plugins-rs ;)

In any case, this MR should be ready.

@thiblahute thiblahute force-pushed the singlesocket branch 2 times, most recently from 78c18b0 to aa7a7cc Compare August 5, 2022 01:34
@MathieuDuponchelle
Copy link
Collaborator

MathieuDuponchelle commented Aug 8, 2022

The EndSessionMessage is a bit unwieldy. I think I would rather do the following:

consumer (peer-id c) -> server -> producer (peer-id p)

StartSession peer_id=p  -> StartedSession session_id=s peer_id=c ->
                        <- StartedSession session_id=s peer_id=p
EndSession session_id=s -> EndedSession session_id=s peer_id=c ->

What do you think?

@thiblahute
Copy link
Contributor Author

thiblahute commented Aug 16, 2022

Sounds like you need to maintain more state in both peers to retain the session ID which you do not care about in most cases so I don't see how that simplifies anything in practice.

@MathieuDuponchelle
Copy link
Collaborator

Sounds like you need to maintain more state in both peers to retain the session ID which you do not care about in most cases so I don't see how that simplifies anything in practice.

It simplifies things by removing an error case (the peer exists but is not registered as the provided type). Besides that, the message relates to ending a session, so expecting whoever wants to do that to keep a trace of a session ID isn't that unreasonable :)

@thiblahute
Copy link
Contributor Author

It simplifies things by removing an error case (the peer exists but is not registered as the provided type).

Well, it means you have a different set of possible errors yes, not sure one error set is simpler or not (in the code detecting this specific error is very simple).

so expecting whoever wants to do that to keep a trace of a session ID isn't that unreasonable

Unreasonable no, not necessary, yes.

@MathieuDuponchelle
Copy link
Collaborator

Unreasonable no, not necessary, yes.

Well I think it is necessary to get this merged :)

@thiblahute thiblahute changed the title protocol: Several enhancements to allow using the same socket for several peerTypes WIP: protocol: Rework to allow using the same socket for several peerTypes Aug 18, 2022
@thiblahute thiblahute force-pushed the singlesocket branch 2 times, most recently from 444222d to 59ce6b9 Compare August 18, 2022 16:15
@thiblahute thiblahute changed the title WIP: protocol: Rework to allow using the same socket for several peerTypes protocol: Rework to allow using the same socket for several peerTypes Aug 18, 2022
@thiblahute thiblahute force-pushed the singlesocket branch 4 times, most recently from 1678458 to 15f1e8a Compare August 19, 2022 17:58
This way we can use the same WebSocket where several peerTypes being
communicated and some those type can be unregistered, re registered
without ever closing the Socket connection.

This also introduces sensible symmetry between different message types.
This allows for more use cases to be handled like having several session
between 2 peers, and it simplifies the code a bit and makes the protocol
sensibly cleaner

Webrtcsink has been refactored a bit to take the new concept into
account
…equirement

Since clients know from the start their Peer ID it is fine to go ahead
and connect as a consumer without prior registration.
- Remove registration messages
- Add a setPeerStatus method which lets other peers know about their roles
@thiblahute
Copy link
Contributor Author

ping @meh

@MathieuDuponchelle
Copy link
Collaborator

Thanks for taking the time to refactor in-depth, this new protocol is a clear improvement :) Do you think all four commits are useful to have in the history, or should we fixup some or all of them?

@MathieuDuponchelle
Copy link
Collaborator

I'm OK with the changes btw

@thiblahute
Copy link
Contributor Author

Thanks for taking the time to refactor in-depth, this new protocol is a clear improvement :) Do you think all four commits are useful to have in the history, or should we fixup some or all of them?

I think they make sense, I ended up reworking the history in a way that made sense to me. If you want it some other way, please let me know.

@MathieuDuponchelle
Copy link
Collaborator

I didn't look at how the individual commits were split up tbh, if you say the split up makes sense let's go for it :)

@MathieuDuponchelle MathieuDuponchelle merged commit a4f0364 into centricular:main Aug 30, 2022
@MathieuDuponchelle
Copy link
Collaborator

Thanks :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants