openid/sharedsignals

What to do when stream status and subject status do not agree?

Closed this issue · 2 comments

A stream can be in one of three states:

  1. enabled
  2. paused
  3. disabled

A subject that a stream is subscribed to can also be in one of those three states.

If a Receiver calls the Get Status endpoint and provides the optional subject argument, but the stream state and the subject state do not agree, what value should the Transmitter return? Same question for when the Receiver sets the status and provides the optional subject argument. My inclination is that it should work like this, but I would like to clarify in the spec:

Stream Status Subject Status Transmitter Response
enabled enabled enabled
enabled paused paused
enabled disabled disabled
paused enabled paused
paused paused paused
paused disabled disabled
disabled enabled disabled
disabled paused disabled
disabled disabled disabled

This could be expressed as an ordering where enabled < paused < disabled, and when there are disagreements the higher value wins.

Note that this could cause some confusion for the Receiver when they set the status of a stream or subject and get back a different status than they requested. However, that seems better than setting a status on one subject and having it affect other subjects (i.e. if enabling a subject also enabled a stream, for instance).

If we have different options available for the status of streams vs subjects, then we need to spell that out in the spec. The question would still remain though - what happens when stream and subject status don't agree?