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

Implement backend-webrtc-rs so we can compare performance with backend-go-pion #39

Closed
Connoropolous opened this issue May 28, 2023 · 21 comments
Labels
enhancement New feature or request help wanted Extra attention is needed stale This item has been open for 30 days with no activity.

Comments

@Connoropolous
Copy link

Connoropolous commented May 28, 2023

Trying to use backend-webrtc-rs instead of backend-go-pion but it won't compile.

This is running cargo build --release --target aarch64-apple-ios, but maybe it also happens for normal targets. Not sure yet, haven't checked.

error[E0433]: failed to resolve: use of undeclared crate or module `imp`
  --> /Users/connor/.cargo/registry/src/github.com-1ecc6299db9ec823/tx5-0.0.1-alpha.17/src/back_buf.rs:13:10
   |
13 |     imp: imp::ImpWriter,
   |          ^^^ use of undeclared crate or module `imp`

error[E0433]: failed to resolve: use of undeclared crate or module `imp`
  --> /Users/connor/.cargo/registry/src/github.com-1ecc6299db9ec823/tx5-0.0.1-alpha.17/src/back_buf.rs:22:18
   |
22 |             imp: imp::ImpWriter::new()?,
   |                  ^^^ use of undeclared crate or module `imp`

error[E0433]: failed to resolve: use of undeclared crate or module `imp`
  --> /Users/connor/.cargo/registry/src/github.com-1ecc6299db9ec823/tx5-0.0.1-alpha.17/src/back_buf.rs:65:21
   |
65 |     pub(crate) imp: imp::Imp,
   |                     ^^^ use of undeclared crate or module `imp`

error[E0433]: failed to resolve: use of undeclared crate or module `tx5_go_pion`
  --> /Users/connor/.cargo/registry/src/github.com-1ecc6299db9ec823/tx5-0.0.1-alpha.17/src/back_buf.rs:76:33
   |
76 |     pub(crate) fn from_raw(buf: tx5_go_pion::GoBuf) -> Self {
   |                                 ^^^^^^^^^^^ use of undeclared crate or module `tx5_go_pion`

error[E0433]: failed to resolve: use of undeclared crate or module `imp`
  --> /Users/connor/.cargo/registry/src/github.com-1ecc6299db9ec823/tx5-0.0.1-alpha.17/src/back_buf.rs:78:18
   |
78 |             imp: imp::Imp::from_raw(buf),
   |                  ^^^ use of undeclared crate or module `imp`

error[E0433]: failed to resolve: use of undeclared crate or module `imp`
  --> /Users/connor/.cargo/registry/src/github.com-1ecc6299db9ec823/tx5-0.0.1-alpha.17/src/back_buf.rs:87:18
   |
87 |             imp: imp::Imp::from_slice(slice)?,
   |                  ^^^ use of undeclared crate or module `imp`

error[E0433]: failed to resolve: use of undeclared crate or module `imp`
   --> /Users/connor/.cargo/registry/src/github.com-1ecc6299db9ec823/tx5-0.0.1-alpha.17/src/back_buf.rs:102:18
    |
102 |             imp: imp::Imp::from_json(s)?,
    |                  ^^^ use of undeclared crate or module `imp`

error[E0425]: cannot find value `on_new_conn` in module `endpoint`
   --> /Users/connor/.cargo/registry/src/github.com-1ecc6299db9ec823/tx5-0.0.1-alpha.17/src/config.rs:320:55
    |
320 |                 .unwrap_or_else(|| Arc::new(endpoint::on_new_conn));
    |                                                       ^^^^^^^^^^^ not found in `endpoint`
@neonphog
Copy link
Collaborator

@Connoropolous - webrtc-rs isn't implemented at all, I just wanted to make sure the feature switching logic was in place to ensure the availability of that path when it's ready.

There are some issues I'm keeping my eye on:

In general the lib doesn't feel ready for prime-time. There are anecdotally many performance issues with it, and lots of churn / immature aspects that just need some time to sort out.

That being said, if someone had time, we do want to see it implemented so we can start to get some apples-to-apples comparisons and be able to make an informed decision about when we/it are ready to switch to as a default.

@neonphog neonphog added the help wanted Extra attention is needed label May 29, 2023
@Connoropolous
Copy link
Author

I see. Ok, thanks.
Do you have any immediate ideas or perspective on the apparent tx5 panic mentioned here?
https://hackmd.io/_CFnGaWvQg6Ys3DxZblmug#May-28
It seems the next step is to track it down

@Connoropolous
Copy link
Author

It seems likely to stem from an unwrap as there's no error specific error message, true?
https://github.com/search?q=repo%3Aholochain%2Ftx5%20.unwrap&type=code

@neonphog
Copy link
Collaborator

@Connoropolous - oo, that actually looks like a panic in the GO code... unfortunately both languages use that term.

I have a highest level panic catch in the go lib, but for this case I think I might need to add a lower-level one so the error can be returned with the more relevant call. Well... I'll look into it in any case, and create a new issue for this.

Thanks for finding all these issues!!

@Connoropolous
Copy link
Author

Ok fantastic.

@Connoropolous
Copy link
Author

if you need anything to construct steps to reproduce, let me know

@neonphog
Copy link
Collaborator

#40

@neonphog neonphog added the enhancement New feature or request label May 29, 2023
@neonphog neonphog changed the title attempted use of backend-webrtc-rs fails Implement backend-webrtc-rs so we can compare performance with backend-go-pion May 29, 2023
@neonphog
Copy link
Collaborator

@Connoropolous - If it's okay, I'll leave this open for actually implementing the webrtc-rs backend. I changed the title : )

@neonphog neonphog reopened this May 29, 2023
@Connoropolous
Copy link
Author

Ok cool

@Connoropolous
Copy link
Author

@neonphog I have no idea whether we'd be up for the challenge of this at all, without a sense of the scope... can you give me an impression of the work involved in doing this?

@Connoropolous
Copy link
Author

is it kind of like implementing the equivalent of the things that are marked with the backend-go-pion feature?

https://github.com/search?q=repo%3Aholochain%2Ftx5%20backend-go-pion&type=code

@neonphog
Copy link
Collaborator

@Connoropolous - yep exactly, the good part is that the go version is already implemented so you can use that as a guide. Some challenges of unknown size:

  • The go lib requires a very odd go buffer type. That has been abstracted too, but I don't know how easy it will be to make the webrtc-rs buffer type (Vec<u8>? bytes::Buf?) work with it.
  • There are undoubtedly some points in the codebase where the abstraction has leaked (because we only had the one backend type) that will need to be cleaned up.
  • It's possible the unit tests will run properly with cargo test --no-default-features --features backend-webrtc-rs... but if not, that'd need to be fixed, and it'd be good to have the CI system updated to run the tests on both features.

@Connoropolous
Copy link
Author

just cause I was curious, I tried something, can you check if its in the right direction.
#41

@github-actions
Copy link

This item has been open for 30 days with no activity.

@github-actions github-actions bot added the stale This item has been open for 30 days with no activity. label Sep 26, 2023
@neonphog neonphog removed the stale This item has been open for 30 days with no activity. label Sep 26, 2023
@github-actions
Copy link

This item has been open for 30 days with no activity.

@github-actions github-actions bot added the stale This item has been open for 30 days with no activity. label Oct 27, 2023
@neonphog neonphog removed the stale This item has been open for 30 days with no activity. label Oct 27, 2023
Copy link

This item has been open for 30 days with no activity.

@github-actions github-actions bot added the stale This item has been open for 30 days with no activity. label Nov 27, 2023
@neonphog neonphog removed the stale This item has been open for 30 days with no activity. label Nov 27, 2023
Copy link

This item has been open for 30 days with no activity.

@github-actions github-actions bot added the stale This item has been open for 30 days with no activity. label Dec 28, 2023
@neonphog neonphog removed the stale This item has been open for 30 days with no activity. label Jan 2, 2024
Copy link

github-actions bot commented Feb 2, 2024

This item has been open for 30 days with no activity.

@github-actions github-actions bot added the stale This item has been open for 30 days with no activity. label Feb 2, 2024
@neonphog neonphog removed the stale This item has been open for 30 days with no activity. label Feb 2, 2024
Copy link

github-actions bot commented Mar 4, 2024

This item has been open for 30 days with no activity.

@github-actions github-actions bot added the stale This item has been open for 30 days with no activity. label Mar 4, 2024
@neonphog neonphog removed the stale This item has been open for 30 days with no activity. label Mar 4, 2024
Copy link

github-actions bot commented Apr 4, 2024

This item has been open for 30 days with no activity.

@github-actions github-actions bot added the stale This item has been open for 30 days with no activity. label Apr 4, 2024
Copy link

This item has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed stale This item has been open for 30 days with no activity.
Projects
None yet
Development

No branches or pull requests

2 participants