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

The big picture #1

Open
33 of 72 tasks
lgrahl opened this issue Mar 1, 2018 · 4 comments
Open
33 of 72 tasks

The big picture #1

lgrahl opened this issue Mar 1, 2018 · 4 comments

Comments

@lgrahl
Copy link
Member

lgrahl commented Mar 1, 2018

To Do:

  • API additions
    • rawrtc_sctp_context
      • DTLS role getter
      • DTLS transport state getter
      • SCTP transport detach (from DTLS transport) handler
      • SCTP transport outbound handler
      • SCTP transport destroyed handler
      • Enter event loop thread (?)
      • Leave event loop thread (?)
    • rawrtc_sctp_transport_feed_inbound
    • rawrtc_sctp_transport_set_mtu
    • rawrtc_sctp_transport_get_mtu
    • rawrtc_sctp_transport_enable_mtu_discovery
    • rawrtc_sctp_transport_set_context
    • rawrtcdc_timer_tick
  • Get rid of struct rawrtc_data_channel_options.
  • Remove everything from RAWRTC that has been defined in RAWRTCDC
  • Fix private declarations in public API
  • Move rawrtc_sctp_transport_get_capabilities into sctp_transport.c
  • Move rawrtc_sctp_transport_state_to_name to the bottom of sctp_transport.c
  • Test that default MTU works (it may need to be applied when starting the transport as well)
  • Ensure disabled SCTP checksum is not problematic regarding interop or disable it by default (see Disabling SCTP checksum NEAT-project/usrsctp-neat#13).
  • Ensure redirect transport still works
    • Make it non-blocking
    • Add state handler
    • Receive/send async
    • Update in RAWRTC
    • Update redirect transport tool
  • Add missing functions from todos
  • Test CRC32C speed
    • We can achieve ~110% of the original speed by disabling checksum verification at the receiver side.
  • Create issues for TODO items
  • Move and close related issues from RAWRTC
  • Proper documentation
    • If a function can fail (even if only due to invalid input parameters), it will return a enum rawrtc_code.
    • Function parameters ending with p will usually be de-referenced and it's value will be changed. The documentation of the parameter will clearly indicate whether or not that's the case.
    • Multithreading
      • The below mutex documentation only applies if the SCTP iterator thread is not only idling (it does look like it's just idling and can be removed - see SCTP iterator thread NEAT-project/usrsctp-neat#12).
      • Locking: Always hold a lock to the mutex by calling re_enter_thread (you can set your own mutex by calling re_set_mutex(your_mutex)) before calling functions of this library. Some event loops always hold a lock implicitly when handling callbacks. So, if the event loop's mutex has been applied and if used inside such a context, you do not need to lock explicitly.
      • Unlocking: If explicitly locked by calling re_enter_thread, you need to explicitly unlock by calling re_leave_thread.
    • FAQ
      • Is it a complete SCTP implementation? No, it uses usrsctp underneath.
      • Where is it intended to be used? In a WebRTC or ORTC stack on top of DTLS.
      • Who should use this? Everyone who is interested in having support for data channels who already has an ICE/DTLS stack.
      • But I also need ICE/DTLS! Check out RAWRTC.
      • Can I access struct members directly and do hacky stuff? Certainly, just import rawrtcdc_internal.h. Be aware, there may be breaking API changes even between minor versions when accessing non-public functions and structures. If you're missing something essential, create a new issue or make a pull request instead of using the internal API.
    • Warnings
      • Under no circumstances should you mem_deref stuff that's being used inside of a handler function called by RAWRTCDC or you will see segfaults. Instead, schedule removal and do it after the handler function returned.
  • Backport (from RAWRTCC to RAWRTCDC and RAWRTC)
    • Fix callback typedefs to make them documentable
    • Project author in CMake
    • Version parsing from rawrtc*.h
    • Generated rawrtc*_configuration.h header
    • Install public header -> Install headers
    • Remove generated rawrtc*_internal.h header
    • Docs (all files)
  • Ensure debug level can still be set (and defaults to 5) across libraries. Test this inside rawrtc-terminal-demo.
  • Build using CI
  • Docker container?
  • Pull request

Afterwards:

  • GitHub release
  • Announce
    • Twitter
    • W3C WebRTC Mailing List
  • Consider setting states earlier and therefore get rid of issues when a callback calls a function during a state change that also checks the state. This would also get rid of the quirky helper flags.
  • Make SCTP send/receive window configurable
  • Test ARM detection.
  • Consider requiring to mem_ref of the channel when calling rawrtc_data_channel_handler or close the channel immediately. (No implicit reference anymore.)
  • Backport generated header to RAWRTC
  • Remove thread ID sanity check from RAWRTC (see: SCTP iterator thread NEAT-project/usrsctp-neat#12)
  • const * const or const* const - decide!
  • Write tests
  • Hardware CRC32C for ARM?
  • Backpressure handling
    • Sending: Wait for buffered amount low, send, repeat (normal/streamed)
      • Use a send buffer per channel.
      • Implement setting buffered amount low threshold
      • Get buffered amount info from usrsctp's internal buffers & our own buffers
      • Raise buffered amount low (on open, after each write if buffered amount is low enough)
    • Receiving: Pause transport if busy, unpause transport, receive message event, repeat (normal/streamed)
      • Add a way to pause/unpause the data transport for incoming messages (something like rawrtc_data_transport_pause_incoming(true/false))
        • Warning: This will also pause all other channels. Talk to the usrsctp folks to find out whether it's possible to signal backpressure on a single stream without affecting other streams.
      • Remember SCTP read event if paused
      • When unpausing, handle pending SCTP read events
@Globik

This comment has been minimized.

@lgrahl

This comment has been minimized.

@Globik

This comment has been minimized.

@lgrahl

This comment has been minimized.

@lgrahl lgrahl changed the title Initial release The big picture Mar 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants