moq-wg / moq-transport

draft-ietf-moq-transport
Other
86 stars 22 forks source link

Clarification on what current object means in SUBSCRIBE, SUBSCRIBE_OK and FETCH #592

Open wilaw opened 3 weeks ago

wilaw commented 3 weeks ago

Given the sequence below, of Groups each containing 4 objects, with the request time of subscription shown midway through receipt of object 1 of group 2. The relay has received the first bytes of Object 1-2, but not the complete object.

Screenshot 2024-10-22 at 10 19 27

  1. Current SUSBCRIBE text indicates

Latest Group (0x1) : Specifies an open-ended subscription with objects from the beginning of the current group. If no content has been delivered yet, the subscription starts with the first published or received group.

Latest Object (0x2): Specifies an open-ended subscription beginning from the current object of the current group. If no content has been delivered yet, the subscription starts with the first published or received group.

Does a SUBSCRIBE of Latest Object (0x2) begin with a) 2-0 because it the latest complete object at the relay b) 2-1 because some of the bytes have been received c) 2-2 because we don't want to start a subscription on a partially received object

  1. FETCH text indicates

EndObject: The end Object ID, plus 1. A value of 0 means the entire group is requested.

What is the largest EndObject object a player can issue a FETCH for? Is it a) Object 2-0 because that is the last fully received object? b) Object 2-1 because some bytes have been received?

  1. SUBSCRIBE_OK text indicates

Largest Object ID: The largest Object ID available within the largest Group ID for this track. This field is only present if ContentExists has a value of 1.

What largest Object ID would be returned? Is it a) 2-0 because it the latest complete object at the relay b) 2-1 because some of the bytes have been received

afrind commented 3 weeks ago

Speaking as someone with a non-caching relay implementation:

SUBSCRIBE_OK will return 2-1 SUBSCRIBE (Latest obj) begins with 2-2

I haven't implemented FETCH yet, but I think FETCH can set the end object to 2^62-1. The question is, what comes in the FETCH OK? Since I don't have a cache, I can just forward upstream (side question: should the relay rewrite the upstream FETCH end object to 2-1?). If I had a cache, I'm not sure. I want to set the end object in FETCH OK to 2-1, but because it would be incomplete in cache, it's probably easier to return 2-0, but that might create a gap that needs refetching.