Ripple is a synonym for Firebolt Implementation, it is a Rust based Application gateway which supports loading dynamic extensions. Ripple will provide a Firebolt Gateway which will be used by Distributors and App Developers to interact with the Application platform to discover, launch and manage video streaming applications.
let's ripple better
Rust is a systems programming language that offers the performance and small footprint of C with the abstractions of a higher level language. The package manager is similar to the ease-of-use found in NodeJS's npm or yarn systems. It ships with a build system. Because of this, it is possible to produce a binary that will run on an Arm v7 processor. This makes it easy to demonstrate native code running on real hardware. The compiler keeps developers out of trouble. Especially helpful for new systems programmers in that it eliminates entire classes of bugs that exist in languages like C/C++.
Before we run Ripple we need to take a moment to understand the manifest files used in Ripple.
There are 3 Manifest files which are necessary for Ripple 2.0.
Device Manifest
: Contains configurations, capabilities and link for the app libraries. Device Manifest complies to the Open RPC schema detailed in the Firebolt configuration repo. An example for the device manifest can be found inexamples/manifest/device-manifest-example.json
Extension Manifest
: Contains the path of the extensions, contracts used and fulfilled by each extension. An example of the extn manifest can be found inexamples/manifest/extn-manifest-example.json
.App Library
: Contains the App catalogue denoting the App Launch Url and configurations required by Ripple for launching and management. An example can be found inexamples/manifest/app-library-example.json
.
-
$git submodule update --init --recursive
- Before running this command if you already have a
~/.ripple
folder take backup.
./ripple init
- Open the Plugin Manifest file
~/.ripple/firebolt-extn-manifest.json
Update the default_path
"default_path": "[Path to your workspace]/ripple-workspace/target/debug/",
Update default_extension value will be dylib
for mac, dll
for windows and for unix it will so
"default_extension": "dylib",
- Open the Device Manifest file
~/.ripple/firebolt-device-manifest.json
Update default_extension
"library": "~/.ripple/firebolt-app-library.json",
- Open the App library file
~/.ripple/firebolt-app-library.json
Add the below parameter to the start_page
in the app library. Replace [app_id] with actual app id and [RIPPLE_IP_ADDR] with the IP address where ripple is running
__firebolt_endpoint=ws%3A%2F%2F[RIPPLE_IP_ADDR]%3A3473%3FappId%3D[app_id]%26session%3D[app_id]
For eg for refui of firebolt cert app
default_library": [
{
"app_id": "refui",
....
"start_page": "https://firecertapp.firecert.comcast.com/prod/index.html?systemui=true&__firebolt_endpoint=ws%3A%2F%2F10.0.0.107%3A3474%3FappId%3Drefui%26session%3Drefui&systemui=true",
- Find the ip address of the device which is connected to the same network router as the machine running Ripple.
ripple run {ip address of the device}
Note: Device should be accessible bothways between the machine which is running ripple and target device.
Only follow the below steps, if all the above instructions to run the app locally were successfully executed.
- Install LLVM Debugger from the VS Code Marketplace.
- Open
main.rs
incore/main/
- Set some breakpoints in code.
- Upon clicking on the main method in the file. There would be an option to
Run
orDebug
. Select Debug. - VSCode will pause at the breakpoint and allows access for Debug Playback and ability to inspect the values.
Ripple folder structure has the below layers
This folder contains the workspaces for
sdk
- Contains the building block for all ripple components. More info here.main
- Ripple main starter application loads the extensions, starts the gateway and its services.launcher
- Contains the Launcher code extension which uses Thunder RDKShell API for launching apps. Ripple can run without this extension for external launchers.
This folder contains the workspaces which solves usecase with actual examples
rpc_extn
- Provides an example of how a firebolt method can be made into an extension using the sdk. This would be applicable for both Proprietary and Device specific extensions.
Loads shared libraries during Ripple Startup using extension manifest and provides extensibility.
Lets apply this to an actual Ripple 2.0 runtime which has loaded the below plugins
device/thunder
: This starts the thunder thread and accepts Device Requests. It also accepts Device extentions which assist in proprietary thunder plugins and device specific thunder extensions.distributor/general
: This starts a thread to service Distributor specific contracts like Privacy, Advertising, Session etc.examples/rpc_extn
: This provides 2 extensions one for externalizing Non Firebolt Api which can be proprietary in nature.
Breakdown the big Ripple monolith into smaller runtime extensions using a standardized SDK.