ti-assistant / issues

All bug reports, planned features, and ideas for the TI Assistant
1 stars 0 forks source link

Improve Socket Connectivity #23

Closed GrantWasil closed 11 months ago

GrantWasil commented 11 months ago

When we use this application, we cast the screen the main screen to a TV for everyone to see.

It seems like socket events are only triggered on the completion of a turn in most cases, but we are finding it hard to track what's going on.

It would be nice if a socket event was triggered on every button selection a player makes (I know this could be costly), but then we would be able to have live updates on our main screen.

I'm making assumptions about how things work, but we'd appreciate this!

SephHawkins commented 11 months ago

If I understand correctly, you've got one device running the main screen and are performing updates with other device(s)?

For ease of setup, I didn't end up utilizing websockets for this - in initial testing the multi-device functionality didn't end up getting much use, so I went with polling instead. Each device currently checks for changes every 5 seconds and also gets the latest data whenever a change is made on it. I could change this to poll more frequently, but I'd have to figure out how much that would end up increasing the costs.

Using websockets is another option, but comes with its own set of costs.

I'll take a look into increasing the polling frequency and seeing how that affects costs. If the cost increase is small enough, polling every second might be enough to have the main screen always reflect the latest changes being made on other devices.

SephHawkins commented 11 months ago

Correction - did some digging and it looks like there's a bug preventing updates from properly occurring. I'll see about fixing that.