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

Logic & API outline #23

Merged
merged 10 commits into from
Dec 4, 2023
Merged

Logic & API outline #23

merged 10 commits into from
Dec 4, 2023

Conversation

backkem
Copy link
Collaborator

@backkem backkem commented Nov 29, 2023

This PR adds a first outline for logic and API. It is not meant to be all-encompasing yet, just a step in the right (hopefully) direction.

Design considerations

  • The peer management section describes the core concept that the User Agent will be in control during explicit user consent, peer discovery and authentication. This improves privacy by not exposing peer lists to the JavaScript realm which would otherwise leak a user network topology details. In addition, this approach and UX is highly similar to that which is already in place for the Remote Playback and Presentation APIs (relates to #16).
  • The nomenclature of the Receiver and Request objects is inspired by the Presentation API.
  • The object-oriented nature of the API is inspired by the ORTC API.
  • I used the DataChannel API for message sending since it allows for sending different types like String, Blob and ArrayBuffer (#13) and supports multiple streams (#17).
  • The WebTransport API counterpart allows for full Streams API based, zero-overhead alternative (related to #11).
  • I used an async API for the Receiver and Request where needed. I kept the DataChannel API close/equivalent to it's WebRTC counterpart. (relates to #14).

Preview | Diff

backkem and others added 7 commits November 21, 2023 17:14
- Note RFC 2119 terminology usage expectations
- Define some reusable key terms, reference them
- Add the initial boilerplate for abstract operations: "When asked to ..."
- Clarify user's consent and privacy requirements
- Align constructor argument names with convention when inheriting from EventTarget
- Add missing onerror entry to LP2PDataChannel events table
- Tweak the "The following are the event handlers" boilerplates
  (Bikeshed handles the plural form in <a>s)
- Change from "dispatched" to "fired"
  (Fire is short for create, initialize, and dispatch:
   https://dom.spec.whatwg.org/#firing-events)
- Make LP2PConnectionEvent a CustomEvent, inherit from Event, note some caveats:
  https://dom.spec.whatwg.org/#interface-customevent
- Remove redundant 'when's from Events tables
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

Successfully merging this pull request may close these issues.

None yet

3 participants