Background Color |
---|
|
Introduction
|
Thunder is a Modular architecture with plug and play design where it has a flexibility to enable to enable or disable any feature just as a plugin.
...
- Pre-integrated premium apps
- Pre-integrated app store
- Voice enabled
- Lightningtm App Dev Language
Background Color |
---|
|
WPEFramework goal and Overview
|
Javascript enabler
Goal is to enable/bridge embedded low level C/C++ technology to the Javascript world and it is done by using Javascript enabler.
...
- Interconnection between plugins is based on interfaces.
Background Color |
---|
|
expand |
Architectural Focus/Features
|
Expand |
---|
Architectural FocusAgnostic 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.
FeaturesWebControl - 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 !!!!
|
Background Color |
---|
|
RPC Mechanisms Deployed
|
Expand |
---|
title | RPC mechanisms deployed | JSONRPC/COMRPC Process transparency |
---|
|
draw.io Diagram |
---|
border | true |
---|
| |
---|
diagramName | JSONRPC-COMRPC Process transparency |
---|
simpleViewer | false |
---|
width | |
---|
links | auto |
---|
tbstyle | top |
---|
lbox | true |
---|
diagramWidth | 667 |
---|
revision | 2 |
---|
|
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. - 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 .
- COMRPC : Internally when we want to communicate with different nano/micro services running in different process we can use COMRPC Process.
COMRPCCOMRPC is a binary RPC migration draw.io Diagram |
---|
border | true |
---|
| |
---|
diagramName | COMRPC-1 |
---|
simpleViewer | false |
---|
width | |
---|
links | auto |
---|
tbstyle | top |
---|
lbox | true |
---|
diagramWidth | 641 |
---|
revision | 1 |
---|
|
- Marshalling code,Proxy/Stubs are generated from the C header file!!
InterfacesC 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.
COMRPCQueryInterface/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 LayersCOMRPC 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. JSONRPCJSONRPC is to communicate JSON object messages. draw.io Diagram |
---|
border | true |
---|
| |
---|
diagramName | JSONRPC |
---|
simpleViewer | false |
---|
width | |
---|
links | auto |
---|
tbstyle | top |
---|
lbox | true |
---|
diagramWidth | 641 |
---|
revision | 1 |
---|
|
JSON data objects, boiler plated handlers and documentation are generated from a JSON specification file!! JSONActual 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.
JSONRPCFor deeper and detailed information of JSONRPC ,Please refer https://www.jsonrpc.org/specification Communication Layers- RESTFUL (Web World)
- WebSocket (Web World)
|
Background Colorexpand |
---|
|
Execution Architecture
|
Expand |
---|
![](/download/attachments/144908481/Execution%20Architecture.png?version=1&modificationDate=1617087667000&api=v2)
- 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 .
|
Background Colorexpand |
---|
|
Resources opened up through JSONRPC
|
Expand |
---|
draw.io Diagram |
---|
border | true |
---|
| |
---|
diagramName | Resources opened up through JSONRPC |
---|
simpleViewer | false |
---|
width | |
---|
links | auto |
---|
tbstyle | top |
---|
lbox | true |
---|
diagramWidth | 596 |
---|
revision | 2 |
---|
|
This gives us information regarding once system is ready ,what kind of micro/nano services are all available. Difference between micro and nano is that micro service actually requires graphics -graphical resources or player resources. |
...
Background Color |
---|
|
Referrences
|
Webinar : RDK 4.0 Native App
...