Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

Thunder is a Modular architecture with plug and play design where it has a flexibility to enable or disable any feature just as a plugin.

Key Components available in the THUNDER Framework -

  • WPE WebKit - powerful low-resource embedded WebKit engine with Wayland support
  • WPE Backend - Abstraction layer for WPE WebKit with support for MESA based gfx or Wayland/EGL gfx
  • Thunder - plugin based framework for embedding C/C++ components and bridging the "web" world.
  • RDK Services - RDK Services are set of services used to access device specific functionality.RDK Services are available for launching browser and native applications.It is built on WPE Framework (aka Thunder).

Thunder is a small framework built for embedded devices. It consists out of the following main components -

  • Framework Core
  • Framework Plugins
  • Framework UI

Thunder and RDK Services are key components for micro services to bring into any Box. Thunder offers an event driven interface framework for subsystem availability signaling to the plugins. This framework is utilized to realize concurrent startup scenario using a conditional evaluation only in case a condition changes. This allows for startup without requiring sleeps, or resource consuming polling mechanisms.

For each micro service, we need to implement one plugin as part of RDK Services, and Nano or microservices should configured as part of any of these subsystems.

Designed for Apps:

  • Pre-integrated premium apps
  • Pre-integrated app store
  • Voice enabled
  • Lightningtm App Dev Language

WPEFramework goal and Overview

Javascript enabler

...

maxLevel1

RDK Video Architecture is designed to enable service providers and device manufacturers to develop and deploy innovative video applications, services, and user experiences. It consists of several key components that work together seamlessly to provide a robust video platform.

By leveraging the pluggable architecture of RDK, a variety of target device profiles can be supported, ranging from a basic IP streaming-only STB to a full-fledged RDK TV. 

  • RDK-V IP STB provides a common method to manage video playback functions. The IP client device serves as an interface and receives video content from an in-home media gateway device or from an external media server. It will have only IP based data streaming without any display of its own Tuner capabilities.
  • RDK-V Hybrid STB is an IP STB device along with capabilities such as tuning, conditional access, and stream management with which we can manage complex video functions .
  • RDK-V IP TV is a smart TV profile powered by RDK Video stack that brings all your favorite apps, live channels, and On Demand contents together in one place.
  • RDK Hybrid TV is a combination of RDK TV plus Hybrid capabilities such as tuning, conditional access etc.

Evolution of RDK

From RDK6, RDK shifted from quarterly to annual release cycles, prioritizing quality through meticulous planning and comprehensive certification for improved user experience. This annual RDK Video release aims to synchronize RDK-V with standard industry release practices while comprehensively addressing shared challenges within the community. This approach facilitates the smoother and more consistent adoption of newly contributed features, utilizing the latest releases from technology partners. By aligning with SoC partners, the release enables better resource planning to support core RDK platforms. Furthermore, the RDK video release aligns with SoC, OEM, and App releases, fostering a more cohesive and efficient ecosystem. The first annual release is RDK6 and its release notes can be accessed from here .


draw.io Diagram
bordertrue
diagramName

...

VideoReleases
simpleViewerfalse
width

...

linksauto
tbstyletop
lboxtrue
diagramWidth

...

881
revision1

...


 


Architecture

...

Image Removed

Thunder Framework Overview

Application framework is built on Hardware abstraction Layer, on top of abstraction layer there is a WPE Framework. WPE framework itself dispatched internally that actually starts micro and nano services. Micro and Nano services are exposed to certain interfaces so at the end the system can locked down and executing.

...

Details

Below is an illustrative representation of the RDK Video software stack, depicting the various components and their interactions.

draw.io Diagram
bordertrue
diagramName

...

VideoArchitecture
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth

...

741
revision

...

Modular architecture

  • The system is build up from several  layers. The functionality is contained in  modules.

Separation of concern

  • A nano/micro service has its own  dedicated task/function and fulfils this.  No managers!

Interface based

  • Interconnection between plugins is  based on interfaces.

Architectural focus-page 2

Agnostic to process boundaries (JSONRPC/COMRPC)

  • For security and stability functionality is realized in contained processes. To communicate to process boundaries we need JSONRPC/COMRPC.

Integral implementation of security features 

  • LXC containerization, including users and groups per processes.

Small footprint, low resource usage

  • Building it, only requires ZLIB.

Uniformity

  • All configuration is stored as JSON and read from 1 location, RESTFull API alignment  JSON field names always lowercase, path names Pascal case.

Features

WebControl

  • WPEFramework can be controlled from a webbrowser client on your PC.

Scoped Traceability (controlled from Web)

  • Fine granularity, trace what you need, Web Browser UI to control it all..

Execution architecture (resource constrained)

  • One thread to communicate all.Thread pools.

Ease of use when building a plugin

  • Object oriented approach for communication (JSON, HTTP, WebSocket, COM/JSON RPC).

No hard-linked dependencies.

  • There is NO dependency between the plugins. Use subsystems !!!!

RPC mechanisms deployed

JSONRPC/COMRPC Process transparency

...

 Most important part of framework is to make sure we can run processes & separate process, we can run nano/micro services out of process. So, we need to communicate to nano/micro services throughout API's.

These API's are actually incremented in 2 ways.

  1. JSONRPC : Mainly targeted towards Javascript. Javascript talks to JSONRPC , Communication Layer goes into framework then it transit to C and C++ world, then from C and C++ world we can far communicate back to Javascript using JSONRPC .
  2. COMRPC : Internally when we want to communicate with different nano/micro services running in different process we can use COMRPC Process.

COMRPC

COMRPC is a binary RPC migration

...

  • Marshalling code,Proxy/Stubs are generated from the C header file!!

Interfaces

C header files with a struct definition and pure abstract methods

  • It is based on interfaces and its regular struct in header file that is to contract to actually closed down between two plugins or two instances of C&C++.
  • This struct and interface is to find how we communicate with other plugin or other nano/micro services.
  • If we define structs there is an application that actually creates marshalling code.

COMRPC

QueryInterface/AddRef/Release

  • Under struct, there is a layer coming from WPEframework that is called "COMRPC"
  • COMRPC will make sure Pluming URT isn't there so the queryInterface/AddRef/Release will make sure we can do navigation over the interfaces that  our lifetime on the interfaces.

Communication Layers

  • Domain Sockets
  • TCP Socket

COMRPC migration is part of WPEFramework. If we have COMRPC 'C' migration, the communication layer below are main sockets for TCP Server. It means we could communicate with any interface to other host.

JSONRPC

JSONRPC is to communicate JSON object  messages.

...

 JSON data objects, boiler plated handlers and documentation are generated from a JSON specification file!!

JSON

Actual exchange data in JSON format : RFC4627

  • RFC4627,this is the data message and contract between to separate nano/micro services.
  • This is typically used from web world(from spark or from webkit itself).
  • The relying of the message and pluming is done using JSONRPC.

JSONRPC

For deeper and detailed information of JSONRPC ,Please refer https://www.jsonrpc.org/specification 

Communication Layers

  • RESTFUL (Web World)
  • WebSocket (Web World)

Execution Architecture

Image Removed

  • If a command comes in on settop box ,it will actually be turn into message for eg in above figure ,the Webkit browser will send this message through pipeline to framework.
    Three pipelines coming out of the settop box, different pipelines for different kind of messages.
  • Received message will be deserialized that is getting back to original message and do get cpu usage. After which, we will look at the message where it has to sent to, that message will be packed with where it will send to and it is forward on to threadpool.
  • The threadpool are actually multiple threads maintained by multiple persons. Person pickups the job and secure it ,As in diagram the person is evaluating CPU Usage using machine, CPU Usage value is noted down on the message(eg: CPU usage is 50% in above figure) and send back to from where we initially got the message.
  • Here messages are handled by thread switch. One is communication thread and the other is thread that handled our request. This way the amount of threads used in the system will not increase when multiple connections are created, the more connections you create it will not lead to multiple threadings .

Services (Nano/micro) available in RDK4

Resources opened up through JSONRPC

...

1


At its core, RDK consists of five main stack levels, each serving a specific purpose in the overall architecture. These levels are as follows:

Applications

The Application Layer primarily focuses on the end-user experience. This layer contains applications that provide various services, content, and features to the users. While the RDK ecosystem is continuously evolving, supported applications typically include popular OTT services like Netflix, Amazon Prime Video, and YouTube, alongside native broadcaster applications and other services.

Application Platform

The Application Platform Layer in the RDK ecosystem offers essential tools for developers to create applications. It includes components like a UI framework, HTML5 rendering engine, and a JavaScript runtime. Acting as middleware, this layer facilitates communication between applications and core RDK services. In the RDK Video framework, Firebolt® handles UI rendering and user input, enabling extensive customization. Lightning™, an open-source JavaScript platform, manages the application lifecycle and integrates components using WebGL for rendering. Together, Firebolt® and Lightning™ form a robust foundation for seamless and efficient application development in the RDK Video ecosystem.

Firebolt® 1.0(Ripple) - Firebolt® 1.0 (Ripple) streamlines RDK app integration with standardized rules. Ripple, its open-source Rust-based Application gateway, facilitates dynamic extensions and serves as a Firebolt® Gateway. RDK 6 is Firebolt® 1.0-certified, with a comprehensive test suite for compliance.

Security - The Application Platform Layer ensures robust security with Dobby-managed containerization, leveraging Linux kernel features for process isolation. Downloadable Application Containers (DAC) enable secure running of binary applications on STBs without modification, ensuring compatibility across RDK 6 devices. Access Control is enforced through AppArmor, a proactive Linux security system. RDKM's open-sourced AppArmor profile generator tool for RDK 6 provides fine-grained control over process resources, contributing to a secure environment.

Middleware

Serving as a vital bridge between the Application Platform Layer and the hardware(HAL), the RDK Middleware Layer incorporates essential components that are pivotal for the seamless operation of the RDK platform. Core to this layer are RDK services, providing JSON-RPC services for interactive applications. In the realm of security, iCrypto handles critical cryptographic operations, ensuring secure communication and data protection. Rialto offers a secure solution for AV pipelines in containerized applications, and the Window Manager orchestrates GUI layout. Device management enables streamlined operations in RDK deployments, including bulk operations and firmware downloads. XCONF integration revolutionizes code downloads for a smoother deployment experience. Log uploads aid comprehensive debugging, offering insights into system performance. RDK Feature Control (RFC) enables dynamic feature management for enhanced flexibility. Telemetry systematically collects essential data insights, while WebPA ensures secure communication between cloud servers and RDK devices. The Media Player, crucial for local rendering devices, manages various pipeline functions, supporting IP and QAM playback. The Open Content Decryption Module(OCDM) enforces Digital Rights Management (DRM) policies. Together with other RDK elements, these components ensure the efficient and secure functioning of the RDK platform.

HAL

In the RDK video stack, the HAL Layer(Hardware Abstraction Layer) plays a vital role in facilitating communication between the video application software and hardware components like the GPU, video encoding/decoding hardware, and audio devices. It provides a standardized framework for functions, data structures, and protocols, enabling efficient hardware resource utilization. The HAL layer manages hardware initialization, memory allocation, input/output operations, and hardware-specific events, shielding software developers from hardware complexities and allowing them to prioritize user experience and functionality.

RDK provides a set of HAL APIs that abstract the platform from RDK. Vendors need to implement the HAL APIs to meet the HAL Specifications. With the help of the HAL API Specification for different RDK Components, vendors can successfully port RDK to their platform. Depending on the device profile ( IP STB, IP TV, Hybrid STB etc. ), vendors may choose the relevant components and perform the port by implementing the HAL layer. Detailed information about vendor porting guide will be available soon.

SOC

The System on Chip (SOC) Layer forms the foundational interface between hardware components, ensuring system security and reliability. It incorporates various crucial elements such as DRM Libraries , whichmanages digital rights and secure content delivery to prevent unauthorized access and distribution. Trusted Applications (Apps TA) guarantee the secure execution of sensitive operations and protect critical data from unauthorized access. The Secure Store oversees the storage of DRM keys and Apps triplets, maintaining the confidentiality and integrity of vital data. Additionally, MFR Libraries manage hardware functionality, providing access to specific hardware features and capabilities, thereby contributing to the overall security and functionality of the system.


Application Scenario

Consider the use case of a user accessing a streaming application like Youtube on an RDK Video-supported device. The user interacts with the application through the Application Layer, selecting content and initiating playback. The Application Platform Layer, utilizing the Firebolt® and Lightning™ frameworks, manages the user interface and application lifecycle. The RDK Layer ensures seamless communication between the application and the hardware, managing services, cryptographic operations, inter-component communication, window management, and content decryption through OpenCDM. The RDK HAL Layer then utilizes the Gstreamer media pipeline to decode and render the video content, ensuring a smooth and high-quality viewing experience. Finally, the SOC Layer provides a secure environment for the entire system, safeguarding the hardware, managing DRM policies, and securing sensitive data, ensuring a secure and reliable video streaming experience for the user.


Useful Links

RDK Video:

You can find an overview of the RDK Video platform, detailing its key features and functionalities at RDK Video Documentation

Application Development:

Developers interested in RDK application development using Firebolt® can refer Firebolt® and

Developers interested in RDK application development using Lightning™ can refer Lightning™ Framework

Security:

To understand the security features in the RDK, please refer RDK Security.