🚂 Oddworks: Full Steam Ahead

Blain Smith 🤘
Oddcast
Published in
4 min readOct 20, 2016

It has been 4 months since we released a major update for Oddworks. I figured it was time to let you all in on the current state of affairs.

Oddworks

The meat and potatoes of our open source offering has gotten some awesome features added to it.

Roku Direct Publisher
Recently, Roku announced their Direct Publisher dashboard for developers to submit a Roku channel without writing code. This is a giant step forward to lowering the barrier of entry to get into OTT.

Oddworks will support generating a JSON feed specifically for Roku. This literally means dropping video collections in a special Roku feed view and it will spit out a JSON feed URL you paste into the Direct Publisher dashboard, upload your logos, and hit Save. You now have a Roku app without writing any BrighScript code!

Video Providers
Oddworks now supports fetching from Vimeo, JWPlatform, Ooyala, and Brightcove, video providers in real-time like a high performance cache. We borrowed this concept from our pals over at Fastly. They have a concept for setting the Cache-Control header to serve stale content while they fetch the updated version in the background. This protects the video provider API so you don’t hit API limits and ensures your channels still render content even if the video provider is having issues.

Authentication and Entitlements
Dropping soon Oddworks will support allowing viewers to log into your channel and be entitled to view certain content that you specify. Of course this is a lot easier said than done. There is a lot of thought that goes into account management, payments, subscription levels, and verifying entitlements on content.

We are going to start slow here to ensure we get this right, but for now Oddworks will be able to do basic account management with subscriptions levels and plans backed by Stripe. We do have some enterprise level support for Piano too.

This is the next logical monetization step from the initial support for advertising.

Oddcast
Under the hood we updated the message bus Oddcast to pattern match with bloom filters thanks to Bloomrun. This move not only fixed a few bugs, but also increased speed of the pattern matching.

Platform SDKs and Sample Apps

We have made giant strides forward to provide clients and developers a great set of SDK and starter sample apps to get their channels into the wild for viewers. We continually try to make improvements on performance, memory management, caching, and UI/UX best practices. Day after day we are learning new things paying it forward to the world when it comes to developing apps with Swift (iOS/tvOS), Java (Android), and BrightScript/SceneGraph (Roku).

Tooling and Example Services

Not only are we offering APIs and SDK we also aim to bring development time down by offering up the same tools and example services we use internally to publish channels.

Roku CLI
Roku offers an official Eclipse IDE plugin for developing channels, but not all of us use Eclipse. Nowadays the cool kids use VIM, SublimeText, and Atom as the primary editors and, old faithful, the terminal. As an experiment in learning Go and producing a usable tool we decided to start making a Roku CLI.

Another inspiration for creating this was the amount of Roku devices we actually have connected to our local network in the office.

  • Roku Express (1)
  • Roku Stick (2)
  • Roku 2 (2)
  • Roku 3 (2)
  • RokuTV (1)

That makes 9 Rokus we develop and test on! It makes for remembering IP addresses and passwords a nightmare when we want to push test builds to different devices. So our Roku CLI manages device profiles in a $HOME/.rokuclirc file. It will also scan your local subnet for available devices and zip up and install channels on them for testing. You can read more about it on the oddnetworks/roku-cli repo.

Tinypass Webhooks
One of our integration partners on the platform side is Tinypass which is a subscription management service similar to Stripe. We needed to accept webhooks from changes in their system in order for our client’s channel’s viewers to stay in sync. Tinypass allows you to specify a link to which it will send event data to. That event data needs to be decrypted and dealt with appropriately so we have oddnetworks/odd-tinypass-webhooks-service to handle these events. Granted there is no specific logic for the events, but this integration prompted us to create this and the following really basic Tinypass SDK.

Tinypass Node/JavaScript SDK
Unfortunately, there is no official SDK so we decided to fix that too. The biggest problem we needed to solve was the decryption of webhook events so the SDK we built has a very minimal API for encrypting/decrypting and encoding/decoding data that is exchanged with Tinypass. We did this by downloading the PHP SDK and translating parts of that API over to a Node version. It is rarely used right now it doesn’t even have a README. We will get there…eventually! It could use some attention.

We use oddnetworks/tinypass in the above Tinypass Webhooks service to do the event payload decrypting.

Oddworks API Load Testing
What would an API be without load testing? Well, we have you covered there too. Our oddnetworks/oddworks-api-load-testing CLI does just that. Again, it is one of those tools we needed that we never got to writing a full README. And again, we will get there, but for now you can use it if you need it.

Conclusion

We write a lot of code so you don’t have to and we will continue to do so in order for everyone to have their own video channel on every device on the market! Everything is open source too so if you every want to contribute to powering the next generation of TV then head on over to the Odd Networks GitHub and commit your mark!

--

--

Blain Smith 🤘
Oddcast
Writer for

CTO of @oddnetworks Rebel Geek. Masshole. #crossfit #weightlifting #strengthandconditioning and things with motors