#Selectable Delay Implementation

1 messages · Page 1 of 1 (latest)

oak gale
#

I know vedal already said he isn't going to implement it, but as a programmer and kind of the worst guy, my brain can't help but think of solutions.

Why not have the server send payloads like:

S2C:

{
  "type": "turn_on_lavalamp",
  "delay_predicate": "2 hours"
}```
and
```json
{
  "type": "turn_on_lavalamp",
  "delay_predicate": "6 hours"
}```
and have the lavalamp turn on based on checking its internal settings against the predicate. The above message would be sent at 2 hours behind stream start, and have them send every interval of 30 minutes before stream. At max maybe 6 hours, so the delay predicate would say something like that. This would get sent to every lava lamp regardless of its setting, but it would only care about the one. There are other ways of implementing this, like only sending the maximum of 6 hours and then having the lava lamp do the math on-board for when stream is and turning itself on in advance. Though i still think its possible to do without exposing anything.
toxic moss
#

Alternatively, it could send a notification at the earliest time, and then the lamps would wait a configurable amount afterwards.

deft plume
#

Interesting, but it seems Vedal would rather just not deal with this entirely, based on the Dev stream from yesterday.

toxic moss
#

From his end, all that changes is that he sends the alert sooner (which he wanted to do anyways). The setting just affects how long the lamp waits to start after receiving the signal.