sjb64
Roku Guru

Channel Updates

In the case we have a channel update, which of course has to go through Roku approval, and is released once approved, what if that update involves a schema change in our backend database web services? We cant make the change early, we cant make the change the exactly moment the new channel goes live, and we have to coordinate it with our other devices (website, phones, internal CMS and housekeeping, etc.) that use the web services.

My assumption is that we need to make sure the web services handle either versioning, device specific calls, or fielding in such a way that additional fields are just treated as extraneous, and old fields are left in place and ignored as needed (for example using positional fielding). None of these are a problem, we actually use forms of versioning and positional fielding now.

But before going with my assumption here, figured I'd ask if there was an official stance, or what others (I can only guess TheEndless has run into this) have done to deal with this, or if they're been bitten by this in the past.
Tags (1)
0 Kudos
6 REPLIES 6
TheEndless
Channel Surfer

Re: Channel Updates

I've run into this a number of times. Usually we end up either adding a version parameter to the API calls, or we move the API endpoint altogether and leave the legacy API endpoint up for a few weeks after publishing. Another option would be to build update detection into the channel, so the channel checks at launch and let's the user know if they need to update the channel manually or not.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Tags (1)
0 Kudos
sjb64
Roku Guru

Re: Channel Updates

Yeah, Since the Roku data is pretty static (other than user data), I have my web services do data dumps onto a single serialized agrregate data file every 15 minutes, along with associated serialized detail files on movies (cast, etc) that the Roku reads via simple http and deserializes. The dumps are strored in a directory named by schema version (like 20150503), and the Roku (and other devices) grab the schema level they are looking for. Once the web services move on to a new schema, the old dumps just stay, and any unupdated devices pull they revision they want. Is a simple kludge and what I mean by 'forms of versioning', but it could be better, ideally when the Roku calls the web service stat function which gives current schema number (a call that is fixed in its format - schema, server datetime, a session hash key, etc.), I could force a Roku channel update even if its midday, but I don't think such an option exists. Am just looking for any thoughts of better ways or ideas, and as always I greatly appreciate your input.
Tags (1)
0 Kudos
sjb64
Roku Guru

Re: Channel Updates

I knew Roku couldn't solve this, was more curious about what other people have done.

As far as the overengineering, the Roku is one part of a much bigger puzzle here, and, much like my dev setup (http://forums.roku.com/viewtopic.php?f=34&t=86102) seems excessive, it makes much more sense when you take into account some of the other things we have going on. The column idea you described I already do, just in a binary serialization format - without embedded field names like JSON or XML, I use positional fielding, but the end result is the same.

The Roku update thought was just wishful thinking, that I could pull a single web service call to my system, realize the Roku was out of date due to a versioning discrepancy, and trigger an channel update right there and then. Seems like it would be a simple thing for them to do as the Roku is perfectly capable of a midday update (system menu). Either a channel update or a full update, if that's the only way, would have prevented this from even being a question. So wasn't really "instant", so much as an on demand way to do something that would happen on it's own anyway.

The whole idea maybe is possible with ECP, but it isn't important enough to bother, and the menu structure isn't guaranteed to be stable in future updates (Home, Up, Right, Up...).

btw - CICS lol, next we'll have to support VMS, SSP, and 1401 Autocoder. You just dated yourself even knowing the acronym CICS existed.
Tags (1)
0 Kudos
EnTerr
Roku Guru

Re: Channel Updates

"sjb64" wrote:
The Roku update thought was just wishful thinking, that I could pull a single web service call to my system, realize the Roku was out of date due to a versioning discrepancy, and trigger an channel update right there and then.

That leads to a pretty awful UX, if you think about it. Reminds me of most "smart" TVs - you want to run one of the streaming apps? Oh but you MUST upgrade the software first, we had disavowed all our previous work! When over-generalizing, i call this the "Android" approach (make developer's life easier) vs "iOS" one (make user experience better). In most such cases - whether intentionally or unintentionally - Roku has been taking the "high road", i think.

Seems like it would be a simple thing for them to do as the Roku is perfectly capable of a midday update (system menu). Either a channel update or a full update, if that's the only way, would have prevented this from even being a question. So wasn't really "instant", so much as an on demand way to do something that would happen on it's own anyway.

Ah, but there is bigger picture at play here too. The Co. does staggered software releases, as experienced by those reading about the "latest & greatest" features on their blog and then trying to force update just to see that nothing happens... for a week of eager-beavering. They do it waves based on player S/N, i think for two reasons: a) to smooth load on the servers and b) if SNAFU gets discovered in the wild (known to happen), as damage control measure they can stop further spread till firmware is fixed.

btw - CICS lol, next we'll have to support VMS, SSP, and 1401 Autocoder. You just dated yourself even knowing the acronym CICS existed.

Perhaps, to a degree. I have been involved in couple of project dealing with such acronyms though LU6.2 never grew on me and i had to google the latter two you mentioned. One was last century, the company was building a universal/unifying OLTP gateway and there was a tool that'd deal with legacy data exchange formats - as part of this i learned really well the DATA DIVISION of a COBOL program (wrote parser for it etc) and then we'd generate serialization/externalization code for C++/Java/VB/etc. The second was less than ten years ago and was about porting the prison/corrections system of one of the states from IMS to something more... this century. My point being, old code comes the haunt you once in a while. Like they say "Old fishermen (chemists, hippies, CICS/IMS etc) never die - they just smell that way"
Tags (1)
0 Kudos
TheEndless
Channel Surfer

Re: Channel Updates

"EnTerr" wrote:
Seems like it would be a simple thing for them to do as the Roku is perfectly capable of a midday update (system menu). Either a channel update or a full update, if that's the only way, would have prevented this from even being a question. So wasn't really "instant", so much as an on demand way to do something that would happen on it's own anyway.

Ah, but there is bigger picture at play here too. The Co. does staggered software releases, as experienced by those reading about the "latest & greatest" features on their blog and then trying to force update just to see that nothing happens... for a week of eager-beavering. They do it waves based on player S/N, i think for two reasons: a) to smooth load on the servers and b) if SNAFU gets discovered in the wild (known to happen), as damage control measure they can stop further spread till firmware is fixed.

There is an ECP command you can send to the box to force it to check for and install channel updates, but it won't update the currently running channel (for obvious reasons). My Update My Channels channel updates channels this way.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Tags (1)
0 Kudos
sjb64
Roku Guru

Re: Channel Updates

That all makes sense, but I didn't know they implemented rolling updates, which again makes sense. Was just a thought on an edge case that I figured I'd throw out to get others take on it.

Enterr, not many people would have heard of SSP (IBM System/34 OS) or 1401 Autocoder, joys of having been in the industry for way too long 🙂
Tags (1)
0 Kudos
Community is Temporarily in Read-Only Mode!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

Thanks for your patience — we’re excited to share what’s next!