Internet-Draft moq-chat October 2024
Frindell Expires 12 April 2025 [Page]
Workgroup:
Media Over QUIC
Internet-Draft:
draft-frindell-moq-chat-latest
Published:
Intended Status:
Informational
Expires:
Author:
A. Frindell
Meta

MoQ Chat

Abstract

MoQ Chat (moq-chat) is a simple text based protocol for exercising MoQ Transport.

About This Document

This note is to be removed before publishing as an RFC.

The latest revision of this draft can be found at https://afrind.github.io/draft-frindell-moq-chat/draft-frindell-moq-chat.html. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-frindell-moq-chat/.

Discussion of this document takes place on the Media Over QUIC Working Group mailing list (mailto:moq@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/moq/. Subscribe at https://www.ietf.org/mailman/listinfo/moq/.

Source for this draft and an issue tracker can be found at https://github.com/afrind/draft-frindell-moq-chat.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 12 April 2025.

Table of Contents

1. Introduction

MoQ Chat (moq-chat) is a simple text based protocol for exercising MoQ Transport [MOQT]. The protocol allows many participants to join a virtual chat room, publish messages to the room and receive messages published by others.

2. Conventions and Definitions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

Commonly used terms in this document are described below.

3. Chat Operation

3.1. MoQ Relay

The protocol requires a MoQ relay to act as a chat server. The relay maintains the set of connected clients that have announced a chat track.

3.2. Chat ID

Every chat has a unique ID. The ID is a string of arbitrary length and uniquely identifies the chat. The creation of chat IDs and discovery of the relay is out of the scope of this document.

3.3. Track Names

Each chat participant has a chat track. The namespace of the track is ("moq-chat", <id>, <user-id>, <device-id>, <timestamp>) and the name track is "chat".

  • id - the ID of the chatroom

  • user-id - the user ID

  • device-id - a unique identifier for each device for the user. This allows the same user to join the chat from multiple devices

  • timestamp - the timestamp in seconds when the track started, encoded as a string. This allows a stateless client to start publishing without accidentally overwriting a previously sent group and object. Note: the protocol will still function so long as each chat client selects a monotonically increasing number for this field. Using the common format described here could support future functionality like pulling chat history.

3.4. Joining the Chat

To join the chat a participant sends a SUBSCRIBE_NAMESPACE message to the relay with a namespace prefix ("moq-chat", <id>). MoQ Relays track the current state of all announced namespaces and namespace subscriptions, and forward any matching ANNOUNCE or UNANNOUNCE messages to interested endpoints.

The participant also sends an ANNOUNCE message for their chat track namespace.

3.5. Subscribing to Chat Messages

When receiving an ANNOUNCE that matches the chat prefix, the client extracts the client's user-id, device-id and timestamp from the third, fourth and fifth tuple elements, respectively. The client SHOULD subscribe to the latest timestamp track for each (user-id, device-id) pair.

Upon receiving an UNANNOUNCE, a client SHOULD UNSUBSCRIBE from that matching track if it had previously subscribed.

3.6. Chat Messages

Each chat message is sent in a new Group and new Object. The format of a chat chat message this draft is UTF-8 Encoded text. There is no limit to the length of a chat message beyond those imposed on QUIC streams. Chat clients MUST send an END_OF_GROUP message for each Group.

The starting Group ID for each track starts at 0 and increments by 1. The Object ID for each chat message starts at 0 and increments by 1.

3.7. Leaving the Chat

When a user leaves the chat, they SHOULD send an UNANNOUNCE message for their namespace. They also SHOULD publish an object with status END_OF_TRACK_AND_GROUP on their chat track, since they will start a new track if they rejoin. Finally, they SHOULD send an UNSUBSCRIBE message for any tracks they subscribed to before closing their Transport Session.

If all publishers of a given namespace disconnect from the relay abruptly, the relay will send UNANNOUNCE messages matching SUBSCRIBE_NAMESPACE to interested endpoints.

3.8. Stream Mapping

The RECOMMENDED forwarding preference for the chat track is Subgroup, with all subgroup IDs set to 0, though clients MAY use other forwarding preferences at their discretion.

3.9. Session Closure by the Server

If a client detects a MOQT session has been closed by the relay, it assumes the relay has exited or crashed, and does not attempt to reconnect.

4. Security Considerations

TODO Security

5. IANA Considerations

This document has no IANA actions.

6. Normative References

[MOQT]
Curley, L., Pugin, K., Nandakumar, S., Vasiliev, V., and I. Swett, "Media over QUIC Transport", Work in Progress, Internet-Draft, draft-ietf-moq-transport-06, , <https://datatracker.ietf.org/doc/html/draft-ietf-moq-transport-06>.
[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/rfc/rfc8174>.

Acknowledgments

TODO acknowledge.

Author's Address

Alan Frindell
Meta