An experimental Rails engine used to drive displays hung around an office.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install network_executive
Run the installation script:
$ rails g network_executive:install
If you experience lots of deadlock errors in production, you'll want to enabled threaded mode in your Rails application.
All you have to do is uncomment the following line:
# config/environments/production.rb # Enable threaded mode config.threadsafe!
Tenderlove has an interesting blog post if you'd like to learn more.
All that's left is to start building your network!
- EAS - Allow a channel to break into the schedule to display important content
- Ticker - Allow a separate feed of info. Tweets, metrics, WOWs, etc.
- Network Logo - Useful?
- Commericals / PSAs - The More You Know?
- Set Top Box - The client-side component. SSEs?
- On-Screen Guide - Client-side slide out remote to change channels/networks?
- On-Demand - Change to and stay at a specific channel. "Live" to exit.
A class that represents a server instance. This is what holds the channel-line up and serves content to the browser.
A class that represents a list of schedule programming and a client-side endpoint.
Navigating to a channel URL will "tune in" the viewer into the specified channel and content will be pushed to the browser.
A class that represents content to display to the user.
A program needs to have at least a URL to navigate the browser to.
Set Top Box
The Set Top Box represents the client-side code that drives the whole end user experience.
The On-Screen Guide allows a viewer access to the entire Network.
This provides an easy way to change channels.
Each Network instance will respond to a POST to
/eas with POST data that maps to a channel line-up.
The provided URL will pre-empt any currently scheduled programming.
On the off chance that multiple EAS' are triggered at the same time, setting a priority will help the Network Executive determine which one
should be displayed. A priority of
0 is the highest value.
In the event of a tie, the most recent EAS will take priority.
It is up to the individual to be aware of each EAS they plan to trigger and what priority each should have.
For instance, an EAS for a drop in sales figures should have a lower priority than one indicating a server outage.
Clearing an EAS will be made by accessing
/all_clear. Doing so will return the viewer to regularly scheduled programming.
If multiple EAS' are active, the correct EAS will be cleared.
Commercials provide a fun and interesting way to break up the monotony of viewing analytics data all day. Be creative!
The scheduling of commercials is determined by how many commercials are defined and long each program runs for. By default, commercial breaks are taken twice for each 30-minute block of programming.
On-Demand is an On-Screen Guide feature that allows a viewer to continuously view one specific channel until further notice.
While commercials are ignored, EAS messages will still pre-empt programming.
- Raise an exception if there are no channels to ease bootstrapping for new users
- Swap out jQuery for Zepto?
- Add http://brad.is/coding/BigScreen/
- Should the installation generator turn on threaded mode?
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request