Bug 8085 - Controller firmware update should be a server push, not a poll
: Controller firmware update should be a server push, not a poll
Status: CLOSED FIXED
Product: SB Controller
Classification: Unclassified
Component: Setup
: unspecified
: PC Windows XP
: P2 normal (vote)
: 7.3
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-07 08:30 UTC by Richard Titmuss
Modified: 2009-09-08 09:24 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Titmuss 2008-05-07 08:30:42 UTC
(16:26:35) Richard Titmuss: morning ben
(16:26:41) Ben Klass: hi richard
(16:26:45) Richard Titmuss: i've noticed something and it's bugging me now!
(16:26:55) Ben Klass: uh oh :)
(16:27:10) Richard Titmuss: the firmware upgrade code should not really be polling from jive (it seems to do this every 10 secs?), it should be a server push.
(16:29:37) Ben Klass: okay, sure. 7.1 bug, assign to me? I can probably solve that one pretty quickly
Comment 1 Ben Klaas 2008-05-07 08:59:34 UTC
SetupFirmwareUpgradeMeta appears to me to be checking once/10 minutes (subscribe:3600), but SC (I need to check that) should push a firmwarestatus update immediately after receiving a new firmware version, which this should pick up. Isn't that the correct way to do this?

        local monitor = {
                notify_playerCurrent =
                        function(self, player)
                                if not player then
                                        return
                                end

                                if meta.player and meta.player ~= player then
                                        meta.player:unsubscribe('/slim/firmwarestatus/' .. meta.player.id)
                                end

                                meta.player = player

                                local fwcmd = { 'firmwareupgrade', 'firmwareVersion:' .. JIVE_VERSION, 'subscribe:3600' }
                                player:subscribe(
                                        '/slim/firmwarestatus/' .. player.id,
                                        firmwareUpgradeSink,
                                        player.id,
                                        fwcmd
                                )
                        end,
        }

        jnt:subscribe(monitor)
Comment 2 Richard Titmuss 2008-05-07 09:16:40 UTC
i keep seeing info messages about firmware update every 10 seconds or so. can you also not use 0 in the subscribe, there really is not point doing periodic updates?
Comment 3 Ben Klaas 2008-05-07 09:38:50 UTC
I'll set subscribe down to 0, but are you meaning messages like this every 10 seconds? 

112701:6924313 INFO (NetworkThread.lua:248) - NOTIFY playerNeedsUpgrade: Player {Office SB3}, false, false

Those are playerNeedsUpgrade messages, which don't have anything to do with SBC Firmware upgrade subscriptions afaik

The playerNeedsUpgrade notification was added for dealing with placing a full-screen spinny on SBC when the connected player needs an upgrade or in the process of upgrading. 

So, perhaps the code in jive.slim.Player is sending out playerNeedsUpgrade notifications when it shouldn't (i.e., when the state hasn't changed)? Is that what we're trying to fix here?
Comment 4 Richard Titmuss 2008-05-07 10:00:15 UTC
Yes, that's what were trying to fix. But let's do both :)

heh, ok it's my SqueezePlay 7.2 that needs upgrading. So maybe that's not a bug. But why is this notification sent every 10 seconds when the status does not change? Not that's a bug.
Comment 5 Ben Klaas 2008-05-07 10:06:54 UTC
for the record, I get those messages too, but once/30 seconds, which is the frequency of playerstatus messages coming from SC. I'm confused why you're receiving them 3x more often.

I'll review jive.slim.Player and see why those notifications are always going out. I recall it was a bit tricky getting the logic right to deal with the combinations of player_is_upgrading and player_needs_upgrade messages.
Comment 6 Ben Klaas 2008-06-02 00:01:21 UTC
the issue described in comment #3, playerNeedsUpgrade messages showing up every 10-30seconds, is fixed with 7.1 r2538

leaving the bug open to address the push/pull issue also described here
Comment 7 Ben Klaas 2008-06-06 13:27:32 UTC
add firmwarestatus subscription that SC will push notification on. Make sure not to break existing implementation when adding this one.

cc:ing Andy because this has SN implications.
Comment 8 Ben Klaas 2008-07-01 09:16:34 UTC
retargetting for 7.2
Comment 9 Richard Titmuss 2008-07-04 04:38:36 UTC
Ben, also the date request should be a notification from SC, send every hour and not jive polling SC. Can you fix that with this bug too.

Comment 10 Richard Titmuss 2008-07-04 04:43:14 UTC
scratch that last comment, i've made a new bug for the date subscription. (bug 8646).

looking at the code in jive i'm not sure why this bug is still open, is a SC change still needed?
Comment 11 Ben Klaas 2008-07-25 07:08:28 UTC
double check for 7.2. close if we're already doing this, which I think we are.
Comment 12 Blackketter Dean 2008-08-06 12:42:18 UTC
Ben: Are you going to look at this or are we done?
Comment 13 Ben Klaas 2008-08-06 14:46:09 UTC
just checked, we're done with this bug
Comment 14 James Richardson 2008-12-15 12:04:46 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.