Internet-Draft moq-chat November 2023
Frindell Expires 24 May 2024 [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 24 May 2024.

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. Catalog Format

The moq-chat catalog is used to determine the list of participants in the chat. The format is a text file with text delta encodings.

Object 0 in any Group is a complete list of the usernames of the participants in the chat at the time the Object was published, one per-line. The first line of Object 0 is the version of the catalog format specificaiton. The format described here is moq-chat catalog format version 1.

Object 0 Example:

version=1
alice
bob
charlie

Any Object in a Group with sequence number higher than 0 is a delta encoding, with new participants prefaced with a '+' character and participants that have left the chat prefaced with a '-' character. Every delta encoding object MUST be applied for an endpoint to have a current list of participants.

Delta Encoding Exmaple:

+daphne
-bob

Every username in the catalog MUST be unique. If an endpoint receives a catalog or delta encoding that would result in the same username more than once, it MUST close the session with an error.

Every object in a catalog group MUST be on a single stream, so that updates are delivered in order.

4. Chat Operation

4.1. MoQ Chat Server

The protocol requires that one entity operate as a chat server. The function of the server is to maintain the list of participants in the chat and publish catalog updates.

4.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 server endpoint is out of the scope of this document.

4.3. Track Names

The catalog for a given chat is available by subscribing to moq-chat/id.

4.4. Joining the Chat

To join the chat a participant sends a SUBSCRIBE message to moq-chat/id in order to get the participant list and subsequent participant updates. This SUBSCRIBE requires the AUTHORIZATION_INFO to contain the participant's ASCII string username. It is RECOMMENDED the participant request the catalog starting from the beginning of the current Group. The moq-chat server will reply with an SUBSCRIBE_OK if joining was successful or SUBSCRIBE_ERROR if the join failed.

The participant also sends an ANNOUNCE message to the server with a track namespace of moq-chat/id/participant/username, and an empty Track Name.

When a moq-chat server receives a SUBSCRIBE and sends an SUBSCRIBE OK, it MUST update the catalog. It can either publish a new Group with the updated particiant list, a delta encoding against the current Group, or both.

4.5. Subscribing to Chat Messages

After receiving the most recent catalog information, a client SHOULD subscribe to the track for each active participant.

Upon receiving a delta update removing a participant, a client SHOULD unsubscribe from that track if it had previously subscribed.

Upone receiving a delta update adding a participant, a client should subscribe to the new track.

4.6. Chat Messages

Each chat message is sent in a new Group and new Object. The format of a chat chat message for version 1 catalogs is UTF-8 Encoded text. There is no limit to the length of a chat message beyond those imposed on QUIC streams.

4.7. Leaving the Chat

When a user leaves the chat, it would be nice if they could send a message indicating that their track is complete or no longer available, but the protocol has no such message (yet).

When a server or relay detects a MOQT session has terminated, it MUST update the catalog and remove any participants that had sent ANNOUNCE messages on that session.

4.8. Stream Mapping

There is no prescription for how to map catalog or chat messages onto QUIC streams. Endpoints can choose to use one stream per track, one stream per group or one stream per object.

4.9. Session Closure by the Server

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

5. Security Considerations

TODO Security

6. IANA Considerations

This document has no IANA actions.

7. Normative References

[MOQT]
Curley, L., Pugin, K., Nandakumar, S., and V. Vasiliev, "Media over QUIC Transport", Work in Progress, Internet-Draft, draft-ietf-moq-transport-01, , <https://datatracker.ietf.org/doc/html/draft-ietf-moq-transport-01>.
[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