Versions Compared

Key

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

Table of Contents

LISA : Local Inventory & Storage Manger of DAC Apps

Table of Contents

Overview

Responsibility of LISA service

LISA component is part of RDK DAC framework on STB . Its role is to retrieve, store and maintain DAC bundles and local applications' metadata. LISA is keeping track of what packages are available locally and managing the local storage, both for downloadable bundles as well as persistent storage for the applications. LISA is an abbreviation from for Local Inventory & Storage Manager of DAC Apps.

Lisa is implemented as Thunder out-of-process plugin.  Can be run also in separate container

...

Its responsibility is:

  • to offer service through API towards a controlling app - typically the operator resident app - to install or uninstall DAC Apps locally and to get list of local installed DAC apps, their metadata and storage usage.
  • on request perform the retrieval (download) and local storage (aka install) of the oci bundle and metadata associated with a DAC application. It also exposes progress of the retrieval and notifies when installation is finished
  • allocate/segregate/manage local storage for installing App oci bundles but also segregated persistent storage area for corresponding Apps.
  • on request perform uninstall (delete) of the app (on condition it is not indicated as "locked"). Give the ability to controlling app to mark specific app as locked or unlocked (default).  Use case for marking app as "locked" is to prevent app from being uninstalled when it is in use
  • (added during integration) expose DAC platform specific parameters via id=lisa.dac.config towards platform agnostic resident UI application required for retrieval of bundle_url appropriate for that platform  

Source code

Relation to RDK Packager

LISA is an alternative to the Packager Thunder Plugin used to retrieve ipkg packages, see current git repo location :  https://github.com/rdkcentral/rdkservices/blob/master/Packager/doc/PackagerPlugin.md   

Comparison of LISA with RDK Packager API 

...

LISA

Yocto recipe location : https://code.rdkcentral.com/r/plugins/gitiles/components/generic/rdk-oe/meta-cmf-video/+/refs/heads/rdk-next/recipes-extended/rdkservices/rdkservice-lisa.bb

License : Apachev2

API

API of LISA is available in https://github.com/rdkcentral/ThunderInterfaces/blob/R2/interfaces/ILISA.h

More details on API design of LISA is available here. However it was somewhat over-engineered compared to what we need as Minimum Viable Product (MVP) and hence not all api's from design were implemented.

In next section you see what is implemented as MVP and beyond 

What is implemented, what NOT, development phasing

Not everything of full design has been implemented in LISA code. Focus has been mainly on Minimum Viable Product

Everything marked in italic is implemented so far,  text in grey is not implemented

  • Phase 1: MVP (Minimal Viable Product):
    • initialization with basic recovery on errors (removal of all data)
    • installation
      • libcurl HTTP get with HTTPS and TLS session resumption
      • HTTP code 202 back-off
      • persistent storage creation
      • untarring downloaded bundle
      • no authentication
      • no full metadata support (i.e. auxmetadata and resources)
      • handling of multiple versions of the same application
      • timeout is excluded
    • uninstall
      • full wipeout (both App bundle and associated persistent storage)
    • operationStatus event (returns result of async methods)
      • basic status Success/Error
    • getStorageDetails
      • no params (overall storage used by all Apps) Request payload: {}
      • single installed application Request payload: {"type":"application/dac.native", "id":"<string>", "version":"<string>"}
    • getList:
      • no filters (returns all stored apps)
      • single app  {"type":"application/dac.native"", "id":"<string>", "version":"<string>"}
    • getMetadata
      • single app Request payload: {"type":"application/dac.native", "id":"<string>", "version":"<string>"}
    • getProgress
    • auth module API interface + stub library
    • Configure logical storages on all plaforms
    • Locking support (lock, unlock, getLockInfo) to prevent app from being removed while in use. LISA API Extension (Locking mechanism)
  • Phase 2: whole API
    • full initialization with cleanup and maintenance added (already done)
    • cleanup and maintenance after each operation (already done for install and uninstall)
    •  installation
      • full metadata
      • configurable download timeout implementation
    • persistent storage management (full)
      • creation/deletion/reset
      • quota management and enforcing (TBD how and where)
      • usage reporting: per app, overall
    • download  (download api method : for downloading app metadata, not implemented, confusion method name by the way)
    • reset
      • "storage"
      • "full"
      • "resources"
    • getStorageDetails
      • single installed application Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>"}
    •  getList
      • filtering (already done)
    • setAuxMetada (already done)
    • cancel (already done)
    • Configure quotas in AS/FSM
    • Review logical storages requirements
      • separately for all platforms
        • Phase 2: all supported platform
  • review for all platforms: gaps
  • Phase 3/later: 
    • TBD: authentication module
    • TBD: apps.db - authentication, antirollback, encryption
    • TBD: concurrent parallel downloads
    • TBD : Max quota per specific app? Not sure what is use case/expected behaviour config here

lisa.dac.confg

use getMetadata {"type":"application/LISA", "id":"lisa.dac.confg", "version":"0"} API to learn the recommended "dacBundlePlatformNameOverride" &  "dacBundleFirmwareCompatibilityKey" for this platform and "configUrl" as kickstart Url to learn ASMS url

During integration (and not part of the design) we decided to define a specific app_id "lisa.dac.config" of type "application/LISA" in LISA that can be used by resident UI to learn the default platform parameters it should use towards DAC cloud when requesting bundle_url for the particular platform it is running on. This is to learn the "dacBundlePlatformNameOverride" &  "dacBundleFirmwareCompatibilityKey" platform parameters. There is also "configUrl" parameter Resident UI will use as kick start URL from which it will learn ASMS environment URL to use. see code in Resident UI that uses this https://code.rdkcentral.com/r/plugins/gitiles/components/opensource/RDK_apps/+/refs/heads/6.1.0/accelerator-home-ui/src/api/LISAApi.js#75  (see Jira RDKUI-649 and RDKUI-620 ) 

Example usage of LISA

Example of applications using LISA api

usage of LISA API in Video Accelerator home UI 

Video Accelerator is the default UI on the RDKM Video Accelerator.

There is UI section which allows you to install DAC apps from DAC cloud. It use LISA API to support this use case (and to getlist of installed DAC app at init time) 

see code where LISA API is being used 

in https://code.rdkcentral.com/r/plugins/gitiles/components/opensource/RDK_apps/+/refs/heads/6.1.0/accelerator-home-ui/src/api/LISAApi.js

and https://code.rdkcentral.com/r/plugins/gitiles/components/opensource/RDK_apps/+/refs/heads/6.1.0/accelerator-home-ui/src/api/DACApi.js

see video with an explanation of how to use that UI 


usage in refapp UI

The refapp "resident App" that comes with RDK reference image uses LISA for installing/deleting DAC bundles.

Here are pointers to its code on where/how it uses LISA 

https://github.com/LibertyGlobal/refapp/search?q=LISA

logs of LISA in action in DAC use case

DEMO video of app installation from DAC cloud using cli tool.  You can see in shell on button the logs of LISA in action.

Detailed LISA design

LISA Storages 

LISA provides logical tree/directory structure for its various type of data to store as visualized in diagram below.

The logical storages: [APPS] and [APPS_STORAGE] are configurable per platform as part of LISA thunder plugin config.

draw.io Diagram
bordertrue
diagramNameLISA Overview
simpleViewerfalse
width600
linksauto
tbstyletop
lboxtrue
diagramWidth811
revision1

[APPS] storage for Application bundle 

files of App in App oci bundle are stored in [APPS] storage. 

Paths:

  • App's files: [APPS]/dac/images/{epoch}/{id}/{version}/
  • App's auxiliary resources (e.g. icons), currently not implemented: [APPS]/dac/images/{epoch}{id}/{version}/res
  • Temporary files storage (for downloaded files before unpacking), referred as [APPS_TMP]: 
    • [APPS_TMP] is located in [APPS]/dac/images/tmp
    • [APPS_TMP]/{id}/{version}/ - used for downloading application of given id and given version

Important, LISA's sqlite database of Apps and metadata can be located there eg :  [APPS]/dac/db/{epoch}/apps.db

[APPS_STORAGE]  persistent storage area an App can use:

Apps persistent storage is located in [APPS_STORAGE]. 

Paths:

Apps' persistent storage: [APPS_STORAGE]/dac/{epoch}/{id}/

Epoch

Epoch indicator {epoch} is used for easy invalidation of not supported or revoked format of apps on fundamental changes. May also be used for the antirollback (db authentication - TBD?)

Data Types

LISA is able to handle the following data:

  1. Application-specific:
    • Mandatory application metadata (type, id, version, source URL, name, category)
      • setting on installation request
      • getting
    • DAC bundles
      • downloading
      • deleting
    • Generic resources (files, e.g. icons)
      • downloading,
      • deleting
    • Auxiliary application metadata, dedicated API for:
      • setting
      • updating
      • getting
    • Persistent storage for application
      • creating
      • resetting
      • deleting
    • Storage/persistent storage usage checking
      • getting
  2. Global
    • Storage usage checking
      • getting

API design

Before implementation, at the design stage, the following API in json schema has been defined LISA API .

In later design phase additional lock/unlock api allowing external application manager to signal LISA that a specific app from LISA database is in active use by End user and hence should not be deleted/upgraded at this moment, see description in  LISA API Extension (Locking mechanism)#APISchema

Actual Thunder interface definition/api is in defined in dual COM RPC / JSON- RPC interface in https://github.com/rdkcentral/ThunderInterfaces/blob/R2/interfaces/ILISA.h with annotations to automatically autogenerate* the JSON RPC api at build time

In section below we provide more explanation with the API methods.

API is to be exposed in JSON-RPC over WebSocket like other JSON-RPC thunder services 

For mat is of style :

Code Block
languageyml
titleGeneric LISA json-rpc call
{"jsonrpc":"2.0","id":{id},"method":"com.lgi.dac.lisa.1.methodName", "params":{payload}}

{id} - An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification.

{payload} - A Structured value that holds the parameter values to be used during the invocation of the method. This member MAY be omitted.

Methods

In many of below methods you need to enter "type" <string> of application you want do the method operation for. The only use case we defined for now is installing DAC apps, for that use type as defined in ASMS environment you are working against (that is what resident UI will do). in RDK ASMS instance this is "application/dac.native". (Note that in LG ASMS OneMW instance type "application/vnd.rdk-app.dac.native" is used for DAC apps)

  • install 

Download the application bundle tarball from the given URL, unpack files to dedicated directory, create the db entries and persistent storage on success. Asynchronous operation, handle should be used for tracking the request. The id of an app is unique within the database. That means only one kind of (mime)type can be combined and saved with a specific app id.

Request payload: {"type":"<string>", "id":"<string>", "version":"<string>", "url":"<string>", "appName":"<string>", "category":"<string>"}

As per above comment "type" in RDKM environment will be "application/dac.native" 

Result payload: {"handle":"<string>"}

parameter and errorsvalues
errors
  • "WrongParams" - request not accepted because of wrong parameters
  • "TooManyRequests" - too many requests (e.g. another installation is ongoing)
  • "AlreadyInstalled" - application is already installed, uninstall first
  • "Initializing" - LISA is performing initialization, wait for operationStatus event
handlehandle to refer with the following requests
  • uninstall

Uninstall the application: remove application files and - optionally - persistent storage and db entry. Non-blocking operation, handle should be used for tracking the request.

Request payload: {"type":"<string>", "id":"<string>", "version":"<string>", "uninstallType":"<string>"}

Result payload: {"handle":"<string>"}

parameters and errorsvalues
uninstallType
  • "full" - full removal of all application-related data (db entry, application storage, persistent storage). If other versions are still available, the persistent storage and app record will not be removed. Only the installed_apps row will be removed. In fact, the "full" uninstallType reverts to "upgrade". 
  • "upgrade" - only removes given version of the application, persistent storage is not deleted, neither is the app record in apps table.
    • remark: to allow cleanup of this storage dir and app record at a later point in time, you can call uninstall() without specifying a version and with installType=full.
errors

...

Data Types

LISA is able to handle the following data:

  1. Application-specific:
    • Mandatory application metadata (type, id, version, source URL, name, category)
      • setting on installation request
      • getting
    • DAC bundles
      • downloading
      • deleting
    • Generic resources (files, e.g. icons)
      • downloading,
      • deleting
    • Auxiliary application metadata, dedicated API for:
      • setting
      • updating
      • getting
    • Persistent storage for application
      • creating
      • resetting
      • deleting
    • Storage/persistent storage usage checking
      • getting
  2. Global
    • Storage usage checking
      • getting

API

Formal definition

Formal definition of API in json schema defined at orignial design stage is available in LISA API .

Actual Thunder interface definition/implementation in defined in COM RPC interface in https://github.com/rdkcentral/ThunderInterfaces/blob/R2/interfaces/ILISA.h with annotation to automatically autogenerate actual JSON RPC api at build time

The overview below is a short reference useful for understanding of expected use cases.

Overview

API to be exposed in JSON-RPC over WebSocket 

Generic format (see with https://www.jsonrpc.org/specification and https://github.com/rdkcentral/rdkservices/blob/master/SystemServices/README.md):

Code Block
languagejson
titleGeneric LISA json-rpc call
{"jsonrpc":"2.0","id":{id},"method":"com.lgi.dac.lisa.1.methodName", "params":{payload}}

{id} - An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification.

{payload} - A Structured value that holds the parameter values to be used during the invocation of the method. This member MAY be omitted.

Methods

  • install 

Download the application bundle tarball from the given URL, unpack files to dedicated directory, create the db entries and persistent storage on success. Asynchronous operation, handle should be used for tracking the request. The id of an app is unique within the database. That means only one kind of (mime)type can be combined and saved with a specific app id.

Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>", "url":"<string>", "appName":"<string>", "category":"<string>"}

Result payload: {"handle":"<string>"}

...

  • "WrongParams" - request not accepted because of wrong parameters
  • "TooManyRequests" - too many requests (e.g. another installation is ongoing)
  • "AlreadyInstalled" - application is already installed, uninstall first
  • "Initializing" - LISA is performing initialization, wait for operationStatus event

...

  • uninstall

Uninstall the application: remove application files and - optionally - persistent storage and db entry. Non-blocking operation, handle should be used for tracking the request.

Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>", "uninstallType":"<string>"}

Result payload: {"handle":"<string>"}

...

  • "full" - full removal of all application-related data (db entry, application storage, persistent storage). If other versions are still available, the persistent storage and app record will not be removed. Only the installed_apps row will be removed. In fact, the "full" uninstallType reverts to "upgrade". 
  • "upgrade" - only removes given version of the application, persistent storage is not deleted, neither is the app record in apps table.
    • remark: to allow cleanup of this storage dir and app record at a later point in time, you can call uninstall() without specifying a version and with installType=full.

...

  • "WrongParams" - request not accepted because of wrong parameters
  • "TooManyRequests" - too many requests (e.g. another installation or uninstallation is ongoing)
  • "Initializing" - LISA is performing initialization, wait for operationStatus event

...

  • download

Download arbitrary application's resource, e.g. icon. Resource are stored per application id/version. Asynchronous operation, handle should be used for tracking the request. If the resource of given resKey already exists it is replaced by the newly downloaded resource. If the resKey is unique, but the requested resource file already exists on the filesystem, the file should be stored under a different, unique filename, created by appending a suffix to the existing filename.

Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>", "resKey":"<string>", "url":"<string>"}

Result payload: {"handle":"<string>"}

...

  • key to access given resource file from db entry

...

  • "WrongParams" - request not accepted because of wrong parameters
  • "TooManyRequests" - too many requests (e.g. another installation or uninstallation is ongoing)
  • "Initializing" - LISA is performing initialization, wait for operationStatus event

...

  • reset

Deletes the content of the database and/or persistent storage and/or all resources for the application. Synchronous operation, returns response on success or failure. Optional parameters type, id, version are used to filter the applications on which the reset will be performed. If they are not given, the reset operation affects all the data. Synchronous operation, returns a response on success or failure. 

Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>", "resetType":"<string>"}

Response payload: {"status":"<string>"}

...

  • parameter is required only when "resetType"="resources"

...

  • "full" - deletes all persistent data used by LISA: drops db tables, deletes the content of [APPS] [APPS_STORAGE]
  • "storage" - deletes the content of persistent storage
  • "resources" - deletes all downloaded resources for given application version

...

  • "WrongParams" - request not accepted because of wrong parameters
  • "FilesystemError" -  file operation failed
  • "Initializing" - LISA is performing initialization, wait for operationStatus event
  • getStorageDetails

Returns information on the storage usage. Depending on provided parameters: overall storage usage, application id storage or application id/version storage. Synchronous operation, returns a response on success or failure. Notes on implementation:

  • overall storage usage (for all apps) may be cached based on the data gathered in Initialization and Maintenance flows (see below), however, if returned value is not cached from Initialization and Maintenance flows, the actual value (including current size of the temporary storage) should be returned
  • per app and per app/version storage usage should be estimated synchronously on the invocation of the method, temporary storage should not be included
  • quota returned in storagePayload is an optional parameter, it is returned only when known to LISA.

Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>"}

Result payload: {"storage":"<storagePayload>"}

...

  • optional parameter, if provided, then the details on a storage for applications of given type is returned. This filtering parameter is logically ANDed with the other optional parameters if they are provided.

...

  • optional parameter, if provided, then the details on a storage for applications of given id is returned. Can be only present if "type" parameter is also provided. This filtering parameter is logically ANDed with the other optional parameters if they are provided.

...

  • optional parameter, if provided, then the details on a storage for applications of given id/version is returned. Can be only present if "type" and "id" parameters are also provided. This filtering parameter is logically ANDed with the other parameters.
  • if version is empty but id and type are filled in, the storageDetails result will only show the storage datapath and no actual app path.

...

  • "WrongParams" - request not accepted because of wrong parameters
  • "FilesystemError" -  file operation failed
  • "Initializing" - LISA is performing initialization, wait for operationStatus event

...

{"apps":{"path":"<string>", "quotaKB":"<string>", "usedKB":"<string>"}, "persistent":{"path":"<string>", "quotaKB":"<string>", "usedKB":"<string>"}}

  • getList

Returns a list of installed applications filtered using optional filtering criteria: type, id, version, appName, category. Synchronous operation, returns a response on success or failure.

Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>","appName":"<string>","category":"<string>"}

Resultpayload: {"apps":"<appsPayload>"}

parameters and errorsvaluestype
  • optional parameter to filter apps only of given type. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
id
  • optional parameter to filter apps only of given id. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
version
  • optional parameter to filter apps only of given version. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
appName
  • optional parameter to filter apps only of given name. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
category
  • optional parameter to filter apps only of given category. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
status
  • "WrongParams" - request not accepted because of wrong parameters
  • "TooManyRequests" - too many requests (e.g. another installation or uninstallation is ongoing)
  • "Initializing" - LISA is performing initialization, wait for operationStatus event
appsPayload

{"apps":["app":{"type":"<string>", "id":"<string>", "installed":[{"version":"<string>", "appName":"<string>", "category":"<string>","url":"<string>"}]}]}

  • remark: if no actual versions of an app are installed and only the app row + data storage path remains, then the installed [] will be empty or omitted in above result. Such situation happens when uninstall the only version of an installed app with uninstallType=upgrade.
  • setAuxMetadata

Set an arbitrary key: value metadata for a given application. The existing metadata object is replaced (overwritten) by the provided object. Synchronous operation, returns a response on success or failure. 

handlehandle to refer with the following requests
  • download

Download arbitrary application's resource, e.g. icon. Resource are stored per application id/version. Asynchronous operation, handle should be used for tracking the request. If the resource of given resKey already exists it is replaced by the newly downloaded resource. If the resKey is unique, but the requested resource file already exists on the filesystem, the file should be stored under a different, unique filename, created by appending a suffix to the existing filename.

Request payload: {"type":"<string>", "id":"<string>", "version":"<string>", "resKey":"<string>", "url":"<string>"}

Result payload: {"handle":"<string>"}

parameters and errorsvalues
resKey
  • key to access given resource file from db entry
errors
  • "WrongParams" - request not accepted because of wrong parameters
  • "TooManyRequests" - too many requests (e.g. another installation or uninstallation is ongoing)
  • "Initializing" - LISA is performing initialization, wait for operationStatus event
handlehandle to refer with the following requests
  • reset

Deletes the content of the database and/or persistent storage and/or all resources for the application. Synchronous operation, returns response on success or failure. Optional parameters type, id, version are used to filter the applications on which the reset will be performed. If they are not given, the reset operation affects all the data. Synchronous operation, returns a response on success or failure. 

Request payload: {"type":"Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>", "auxMetadataresetType":<auxMetadataPayload>"<string>"}

Result Response payload: {"status":"<string>"}

parameters and errorsvalues
errors
version
  • parameter is required only when "
WrongParams" - request not accepted because of wrong parameters"WrongMetadata" - request not accepted because of wrong format of metadata object
  • resetType"="resources"
resetType
  • "full" - deletes all persistent data used by LISA: drops db tables, deletes the content of [APPS] [APPS_STORAGE]
  • "storage" - deletes the content of persistent storage
  • "resources" - deletes all downloaded resources for given application version
errors
  • "WrongParams" - request not accepted because of wrong parameters
  • "FilesystemError" -  file operation failed
  • "Initializing" - LISA is performing initialization, wait for operationStatus event
auxMetadataPayload

[{"<string>":"<string>"}]

  • getMetadata
  • getStorageDetails

Returns information on the storage usage. Depending on provided parameters: overall storage usage, application id storage or application id/version storageGet all metadata stored for given application version. Synchronous operation, returns a response on success or failure. 

Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>"}

Notes on implementation:

  • overall storage usage (for all apps) may be cached based on the data gathered in Initialization and Maintenance flows (see below), however, if returned value is not cached from Initialization and Maintenance flows, the actual value (including current size of the temporary storage) should be returned
  • per app and per app/version storage usage should be estimated synchronously on the invocation of the method, temporary storage should not be included
  • quota returned in storagePayload is an optional parameter, it is returned only when known to LISA.

...

Request Response payload: {"statustype":"<string>","metadata":}

...

  • "WrongParams" - request not accepted because of wrong parameters
  • "Initializing" - LISA is performing initialization, wait for operationStatus event

application/vnd.rdk-app.dac.native", "id":"<string>", "

...

version":"<string>"

...

}

Result payload: {"storage":"

...

  • "resources" - array referring downloaded resources; contains "resKey": "file name" mappings
  • cancel

Cancel previous asynchronous request.

Request payload: {"handle":"<string>"}

Response payload: {"status":"<string>"}

...

  • a handle returned earlier by install, uninstall or download request.

...

  • "WrongHandle" - the handle is not correct, e.g. the operation has finished
  • "Error" - operation cannot be canceled
  • getProgress

Get estimated progress of an asynchronous operation.

Request payload: {"handle":"<string>"}

Response payload: {"status":"<string>", "progress":<number>}

...

  • a handle returned earlier by install, uninstall or download request.

...

  • "Ok" - operation successful
  • "WrongHandle" - the handle is not correct, e.g. the operation has finished

...

  • estimated progress, an integer value 0-100

<storagePayload>"}

parameters and errorsvalues
type
  • optional parameter, if provided, then the details on a storage for applications of given type is returned. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
id
  • optional parameter, if provided, then the details on a storage for applications of given id is returned. Can be only present if "type" parameter is also provided. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
version
  • optional parameter, if provided, then the details on a storage for applications of given id/version is returned. Can be only present if "type" and "id" parameters are also provided. This filtering parameter is logically ANDed with the other parameters.
  • if version is empty but id and type are filled in, the storageDetails result will only show the storage datapath and no actual app path.
errors
  • "WrongParams" - request not accepted because of wrong parameters
  • "FilesystemError" -  file operation failed
  • "Initializing" - LISA is performing initialization, wait for operationStatus event
storagePayload

{"apps":{"path":"<string>", "quotaKB":"<string>", "usedKB":"<string>"}, "persistent":{"path

Events

  • operationStatus

Notification sent on the completion of asynchronous operation.

...

":"<string>", "

...

quotaKB":"<string>", "

...

usedKB":"<string>"}}

parameters and errorsvalues
handle
  • a handle returned earlier by install, uninstall or download request.
  • empty string on Initialization notification
status
  • "Success" - operation successful
  • "Failed" - operation failed
details
  • optional parameter, providing more details on the operation status. 

Download progress tracking

Tracking of the download progress is implemented using:

  • requesting for Content-Length HTTP header before actual transfer, to check for available space and to store the size of the resource
  • updating the counter of downloaded bytes on the successful transfer of each data chunk (see libcurl CURLOPT_WRITEFUNCTION)
  • returning the updated value of progress parameter on invocation of getProgress API.

Block diagram

Logical modules

...

LISA auth module

API to be implemented by the library:

  • getAuthenticationMethod(appType, id, URL); returned value should indicate one of method:
    • NONE
    • BASIC_AUTH
    • API_KEY_IN_REQUEST
    • API_KEY_IN_HEADER
    • API_KEY_IN_COOKIE
    • CLIENT_CERT
    • BEARER_TOKEN (Oauth2)
  • getAPIKey(appType, id, URL, *key, bufferSize); value returned in key buffer contains API key to be included to the request; returns 0 on success, 1 on error (buffer too small), 2 on other errors
  • getCredentials(appType, id, URL, *user, *password, bufferSize); returns user/apssword; returns 0 on success, 1 on error (buffer too small), 2 on other errors
  • getClientCertsFile(appType, id, URL, *privKeyFileName, *privKeyPassphrase, *clientCertFileName, bufferSize); returns certificate file names; returns 0 on success, 1 on error (buffer too small), 2 on other errors
  • getToken(appType, id, URL, *token, bufferSize); returns bearer token; returns 0 on success, 1 on error (buffer too small), 2 on other errors

Metadata

JSON metadata data model

sqlite schema

...

Note:

The 2 tables in the db schema (apps and installed_apps) are required to be able to correctly handle the case when the application is uninstalled, deleted because of corruption, deleted because of storage capacity issue, or not installed locally (launched from the cloud) but operator or user wants to keep persistent storage of given application intact (for later usage). In this case, an entry in apps table keeps tracking the persistent storage without introducing any other dirty hacks. This approach will also be useful for managing remote applications, for which we don't need to maintain the application's locally downloaded files, but persistent storage might be needed.

Code Block
languagesql
titlesqlite schema
-- enable support for foreign keys, available since sqlite version 3.6.19 (2009-10-14)
PRAGMA foreign_keys = ON;

-- table for application ids and persistent storage
CREATE TABLE IF NOT EXISTS apps(
idx INTEGER PRIMARY KEY, -- unique index for the application type/id
type TEXT NOT NULL, -- MIME type 
app_id TEXT UNIQUE NOT NULL, -- unique id of app within given MIME type
data_path TEXT, -- path to app peristent storage, relative to [APPS_STORAGE]/{epoch}
created TEXT NOT NULL -- unix epoch timestamp of when the application entry was created 
);

-- table for installed applications in specific versions
CREATE TABLE IF NOT EXISTS installed_apps (
idx INTEGER PRIMARY KEY, -- unique index for the application type/id/version
app_idx INTEGER NOT NULL, -- reference to apps table, index of the application type/id
version TEXT NOT NULL, -- version of the application
name TEXT NOT NULL, -- name of the application
category TEXT, -- category
url TEXT, -- URL from which the application was downloaded
app_path TEXT, -- path to app files, realtive to [APPS]/{epoch}
created TEXT NOT NULL, -- unix epoch timestamp of when the application was installed
resources TEXT, -- json object with downloaded resources metadata
metadata TEXT, -- json object with auxiliary resources metadata
FOREIGN KEY(app_idx) REFERENCES apps(idx),
UNIQUE(app_idx, version)
);

sqlite quick startup 

1. print tables
SELECT sql FROM sqlite_master WHERE name = 'apps';
SELECT sql FROM sqlite_master WHERE name = 'installed_apps';

2. insert app id
INSERT INTO apps VALUES(NULL, 'application/vnd.rdk-app.dac.native', 'com.lgi.app3', 'dac.native/com.lgi.app3/data', strftime('%s','now'));

3. get app_id of given app
SELECT idx,type,app_id FROM apps WHERE type = 'application/vnd.rdk-app.dac.native' AND app_id = 'com.lgi.app3';

4. insert new application version
INSERT INTO installed_apps VALUES(NULL, <app_idx>, '1.0.0', 'Super-app', 'Game', 'http://download.com/bundle1.tgz', 'dac.native/com.lgi.app3/1.0.0/app', strftime('%s','now'), NULL, NULL, NULL);

5. SELECT app version
SELECT DISTINCT apps.type,apps.app_id,installed_apps.version,installed_apps.metadata FROM installed_apps,apps WHERE apps.type='application/vnd.rdk-app.dac.native' AND apps.app_id='com.lgi.app3' AND installed_apps.version="1.0.0";

6. set meatdata for given app/version
SELECT DISTINCT installed_apps.idx,installed_apps.metadata FROM installed_apps,apps WHERE apps.type='application/vnd.rdk-app.dac.native' AND apps.app_id='com.lgi.app3' AND installed_apps.version="1.0.0";
UPDATE installed_apps SET metadata = '{[{"description","New nice application."},{"parental":"5"}]}' WHERE idx=<idx>;

Storages for data

The logical storages: [APPS] and [APPS_STORAGE] should be defined per platform, to use concrete physical storages.

Epoch

Epoch indicator {epoch} is used for easy invalidation of not supported or revoked format of apps on fundamental changes. May also be used for the antirollback (db authentication - TBD?)

Application files: [APPS]

Apps files are stored in [APPS] storage. 

Paths:

  • App's files: [APPS]/dac/images/{epoch}/{id}/{version}/
  • App's auxiliary resources (e.g. icons), currently not implemented: [APPS]/dac/images/{epoch}{id}/{version}/res
  • LISA's db:  [APPS]/dac/db/{epoch}/apps.db
  • Temporary files storage (for downloaded files before unpacking), referred as [APPS_TMP]: 
    • [APPS_TMP] is located in [APPS]/dac/images/tmp
    • [APPS_TMP]/{id}/{version}/ - used for downloading application of given id and given version

Application persistent storage: [APPS_STORAGE]

Apps persistent storage is located in [APPS_STORAGE]. 

Paths:

Apps' persistent storage: [APPS_STORAGE]/dac/{epoch}/{id}/

LISA operations

Initialization

  • getList

Returns a list of installed applications filtered using optional filtering criteria: type, id, version, appName, category. Synchronous operation, returns a response on success or failure.

Request payload: {"type":"<string>", "id":"<string>", "version":"<string>","appName":"<string>","category":"<string>"}

Resultpayload: {"apps":"<appsPayload>"}

parameters and errorsvalues
type
  • optional parameter to filter apps only of given type. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
id
  • optional parameter to filter apps only of given id. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
version
  • optional parameter to filter apps only of given version. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
appName
  • optional parameter to filter apps only of given name. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
category
  • optional parameter to filter apps only of given category. This filtering parameter is logically ANDed with the other optional parameters if they are provided.
status
  • "WrongParams" - request not accepted because of wrong parameters
  • "Initializing" - LISA is performing initialization, wait for operationStatus event
appsPayload

{"apps":["app":{"type":"<string>", "id":"<string>", "installed":[{"version":"<string>", "appName":"<string>", "category":"<string>","url":"<string>"}]}]}

  • remark: if no actual versions of an app are installed and only the app row + data storage path remains, then the installed [] will be empty or omitted in above result. Such situation happens when uninstall the only version of an installed app with uninstallType=upgrade.
  • setAuxMetadata

Set an arbitrary key+value metadata for a given application. The existing metadata key is replaced (overwritten) by the provided key/value pair. Synchronous operation, returns a response on success or failure. 

Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>","key":<string>,"value":<string>}

Result payload: {}

parameters and errorsvalues
errors
  • "WrongParams" - request not accepted because of wrong parameters
  • "WrongMetadata" - request not accepted because of wrong format of metadata object
  • "Initializing" - LISA is performing initialization, wait for operationStatus event
  • getMetadata

Get all metadata stored for given application version. Synchronous operation, returns a response on success or failure. 

Request payload: {"type":"<string>", "id":"<string>", "version":"<string>"}

Response payload: {"status":"<string>","metadata":}

parameters and errorsvalues
errors
  • "WrongParams" - request not accepted because of wrong parameters
  • "Initializing" - LISA is performing initialization, wait for operationStatus event
metadataPayload

{"appName":"<string>", "category":"<string>","url":"<string>","resources":[{"<string>":"<string>"}]},"auxMetadata":<auxMetadataPayload>}

  • "resources" - array referring downloaded resources; contains "resKey": "file name" mappings
  • cancel

Cancel previous asynchronous request.

Request payload: {"handle":"<string>"}

Response payload: {"status":"<string>"}

parameters and errorsvalues
handle
  • a handle returned earlier by install, uninstall or download request.
errors
  • "WrongHandle" - the handle is not correct, e.g. the operation has finished
  • "Error" - operation cannot be canceled
  • getProgress

Get estimated progress of an asynchronous operation.

Request payload: {"handle":"<string>"}

Response payload: {"status":"<string>", "progress":<number>}

parameters and errorsvalues
handle
  • a handle returned earlier by install, uninstall or download request.
status
  • "Ok" - operation successful
  • "WrongHandle" - the handle is not correct, e.g. the operation has finished
progress
  • estimated progress, an integer value 0-100

Events

  • operationStatus

Notification sent on the completion of asynchronous operation.

payload: {"handle":"<string>", "status":"<string>", "details":"<string>"}

parameters and errorsvalues
handle
  • a handle returned earlier by install, uninstall or download request.
  • empty string on Initialization notification
status
  • "Success" - operation successful
  • "Failed" - operation failed
details
  • optional parameter, providing more details on the operation status. 

API compared to Packager

LISA is an alternative to the Packager Thunder Plugin used to retrieve ipkg packages, see https://github.com/rdkcentral/rdkservices/blob/master/Packager/doc/PackagerPlugin.md   

Existing Packager API (RDK services github)Proposed Packager API (DAC RDK wiki)LISA API
install (package, version, architecture)install (id, type, URL, token, listener) → (id, task, success)install (type, id, version, URL, appName, category), → (status, handle)

remove (id, listener) → (id, task, success)uninstall (type, id, version, uninstallType), → (status, handle)


operationStatus→ (handle, status, details)

cancel (task, listener) → (success)cancel (handle) → (status)

isInstalled (id) → (success)-

getInstallProgress (task) → ( percent)getProgress (handle) → (status, percent)

getInstalled() → (applications)getList (filter) → (array of {type, id, version, metadata})

getPackageInfo(id) → (metadata)getMetadata(type, id, version) → (metadata)

-setMetadata(type, id, version, tag, metadata)

getAvaialbleSpace() → (space)getStorageDetails() → (path, quota, size, persistentStoragePath, persistentStorageQuota, persistentStorageSize)
synchronize()
-

Download progress tracking

Tracking of the download progress is implemented using:

  • requesting for Content-Length HTTP header before actual transfer, to check for available space and to store the size of the resource
  • updating the counter of downloaded bytes on the successful transfer of each data chunk (see libcurl CURLOPT_WRITEFUNCTION)
  • returning the updated value of progress parameter on invocation of getProgress API.

Block diagram

Logical modules

draw.io Diagram
bordertrue
diagramNameLISA logical blocks
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth411
revision1

LISA auth module

(is not IMPLEMENTED, was not required for MVP since bundles are encrypted and signed)

API to be implemented by the library:

  • getAuthenticationMethod(appType, id, URL); returned value should indicate one of method:
    • NONE
    • BASIC_AUTH
    • API_KEY_IN_REQUEST
    • API_KEY_IN_HEADER
    • API_KEY_IN_COOKIE
    • CLIENT_CERT
    • BEARER_TOKEN (Oauth2)
  • getAPIKey(appType, id, URL, *key, bufferSize); value returned in key buffer contains API key to be included to the request; returns 0 on success, 1 on error (buffer too small), 2 on other errors
  • getCredentials(appType, id, URL, *user, *password, bufferSize); returns user/apssword; returns 0 on success, 1 on error (buffer too small), 2 on other errors
  • getClientCertsFile(appType, id, URL, *privKeyFileName, *privKeyPassphrase, *clientCertFileName, bufferSize); returns certificate file names; returns 0 on success, 1 on error (buffer too small), 2 on other errors
  • getToken(appType, id, URL, *token, bufferSize); returns bearer token; returns 0 on success, 1 on error (buffer too small), 2 on other errors

sqlite usage

sqlite database schema

draw.io DiagrambordertruediagramNameLISA init

draw.io Diagram
bordertrue
diagramNameLISA sqlite schema
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth
1422
582
revision1

Maintenance and Cleanup

...

Install

...

Uninstall

...

Note:

The 2 tables in the db schema (apps and installed_apps) are required to be able to correctly handle the case when the application is uninstalled, deleted because of corruption, deleted because of storage capacity issue, or not installed locally (launched from the cloud) but operator or user wants to keep persistent storage of given application intact (for later usage). In this case, an entry in apps table keeps tracking the persistent storage without introducing any other dirty hacks. This approach will also be useful for managing remote applications, for which we don't need to maintain the application's locally downloaded files, but persistent storage might be needed.

Code Block
languagesql
titlesqlite schema
-- enable support for foreign keys, available since sqlite version 3.6.19 (2009-10-14)
PRAGMA foreign_keys = ON;

-- table for application ids and persistent storage
CREATE TABLE IF NOT EXISTS apps(
idx INTEGER PRIMARY KEY, -- unique index for the application type/id
type TEXT NOT NULL, -- MIME type 
app_id TEXT UNIQUE NOT NULL, -- unique id of app within given MIME type
data_path TEXT, -- path to app peristent storage, relative to [APPS_STORAGE]/{epoch}
created TEXT NOT NULL -- unix epoch timestamp of when the application entry was created 
);

-- table for installed applications in specific versions
CREATE TABLE IF NOT EXISTS installed_apps (
idx INTEGER PRIMARY KEY, -- unique index for the application type/id/version
app_idx INTEGER NOT NULL, -- reference to apps table, index of the application type/id
version TEXT NOT NULL, -- version of the application
name TEXT NOT NULL, -- name of the application
category TEXT, -- category
url TEXT, -- URL from which the application was downloaded
app_path TEXT, -- path to app files, realtive to [APPS]/{epoch}
created TEXT NOT NULL, -- unix epoch timestamp of when the application was installed
resources TEXT, -- json object with downloaded resources metadata
metadata TEXT, -- json object with auxiliary resources metadata
FOREIGN KEY(app_idx) REFERENCES apps(idx),
UNIQUE(app_idx, version)
);

sqlite quick startup 

1. print tables
SELECT sql FROM sqlite_master WHERE name = 'apps';
SELECT sql FROM sqlite_master WHERE name = 'installed_apps';

2. insert app id
INSERT INTO apps VALUES(NULL, 'application/vnd.rdk-app.dac.native', 'com.lgi.app3', 'dac.native/com.lgi.app3/data', strftime('%s','now'));

3. get app_id of given app
SELECT idx,type,app_id FROM apps WHERE type = 'application/vnd.rdk-app.dac.native' AND app_id = 'com.lgi.app3';

4. insert new application version
INSERT INTO installed_apps VALUES(NULL, <app_idx>, '1.0.0', 'Super-app', 'Game', 'http://download.com/bundle1.tgz', 'dac.native/com.lgi.app3/1.0.0/app', strftime('%s','now'), NULL, NULL, NULL);

5. SELECT app version
SELECT DISTINCT apps.type,apps.app_id,installed_apps.version,installed_apps.metadata FROM installed_apps,apps WHERE apps.type='application/vnd.rdk-app.dac.native' AND apps.app_id='com.lgi.app3' AND installed_apps.version="1.0.0";

6. set meatdata for given app/version
SELECT DISTINCT installed_apps.idx,installed_apps.metadata FROM installed_apps,apps WHERE apps.type='application/vnd.rdk-app.dac.native' AND apps.app_id='com.lgi.app3' AND installed_apps.version="1.0.0";
UPDATE installed_apps SET metadata = '{[{"description","New nice application."},{"parental":"5"}]}' WHERE idx=<idx>;

LISA logic per use case

Initialization

draw.io Diagram
bordertrue
diagramNameLISA sequence diagram - initialization
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth218.24999999999997
revision1

Maintenance and Cleanup

draw.io Diagram
bordertrue
diagramNameLISA sequence diagram - maintenance
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth559.62
revision1

Install

draw.io Diagram
bordertrue
diagramNameLISA sequence diagram - install
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth1421.5
revision1

Uninstall

draw.io Diagram
bordertrue
diagramNameLISA sequence diagram - uninstall
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth847
revision2

Download

draw.io Diagram
bordertrue
diagramNameLISA sequence diagram - Download
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth1421.5
revision1

Lisa Thunder plugin configuration

config schema

Code Block
languageyml
titleLISA plugin configuration schema
{
	"$schema": "plugin.schema.json",
    "jsonrpc":"2.0",
	"info": {
		"title": "Local Inventory & Storage Manager of DAC Apps (LISA) Plugin",
        "class": "Lisa",
		"callsign": "org.rdk.dac.lisa",
		"locator": "libWPEFrameworkLisa.so",
		"status": "alpha",
		"autostart": true,
		"description": "The Local Inventory & Storage Manager of DAC Apps (LISA) plugin allows authenticated downloading and management of DAC bundles from a remote server. It also manages the persistent storage of the DAC applications.",
		"version": "1.0"
	},
	"interface": {
		"$ref": "{interfacedir}/lisa.json#"
	},
	"configuration": {
		"type": "object",
		"properties": {
			"configuration": {
				"type": "object",
				"properties": {
					"network": {
						"type": "object",
						"required": [
							"timeout",
							"default_retryIn"
						],
						"properties": {
							"timeout": {
								"type": "number",
								"description": "Single resource downloading timeout in seconds"
							},
							"default_retryIn": {
								"type": "number",
								"description": "Default value of GET retry delay in seconds on HTTP/202, when no "Retry-After" header field is returned in the response."
							}
						}
					},
					"storages": {
						"type": "object",
						"required": [
							"apps",
							"apps_storage",
							"apps_tmp"
						],
						"properties": {
							"apps": {
								"type": "string",
								"description": "Path to the persistent storage for downloaded applications top dir"
							},
							"apps_storage": {
								"type": "string",
								"description": "Path to the persistent storage for downloaded applications persistent storage top dir"
							},
							"apps_tmp": {
								"type": "string",
								"description": "Path to the temporary storage for applications being downloaded"
							}
						}
					}
				},
				"required": [
					"timeout",
					"storages"
				]
			}
		}
	}
}

example lisa thunder plugin config

Code Block
languageyml
titleLISA plugin configuration example
{
	"$schema": "plugin.schema.json",
	"jsonrpc":"2.0",
	"info": {
		"title": "Local Inventory & Storage Manager of DAC Apps (LISA) Plugin",
        "class": "Lisa",
		"callsign": "org.rdk.dac.lisa",
		"locator": "libWPEFrameworkLisa.so",
		"status": "alpha",
		"autostart": true,
		"description": [
			"The Local Inventory & Storage Manager of DAC Apps (LISA) plugin allows authenticated downloading and management of DAC bundles from a remote server. It also manages the persistent storage of the DAC applications."
		],
		"version": "1.0"
	},
	"interface": {
		"$ref": "{interfacedir}/lisa.json"
	},
	"configuration": {
		"storages": {
			"apps": "/mnt/apps",
			"apps_storage": "/mnt/apps_storage",
			"apps_tmp": "/mnt/apps_tmp"
		},
		"network": {
			"timeout": 1800,
			"default_retryIn": 300
		}
	}
}

Download

...

LISA implementation

LISA should be implemented as a Thunder plugin.

An implementation may be based on the Packager code.

Lisa Thunder plugin configuration

Code Block
languageyml
titleLISA plugin configuration schema
{
	"$schema": "plugin.schema.json",
    "jsonrpc":"2.0",
	"info": {
		"title": "Local Inventory & Storage Manager of DAC Apps (LISA) Plugin",
        "class": "Lisa",
		"callsign": "org.rdk.dac.lisa",
		"locator": "libWPEFrameworkLisa.so",
		"status": "alpha",
		"autostart": true,
		"description": "The Local Inventory & Storage Manager of DAC Apps (LISA) plugin allows authenticated downloading and management of DAC bundles from a remote server. It also manages the persistent storage of the DAC applications.",
		"version": "1.0"
	},
	"interface": {
		"$ref": "{interfacedir}/lisa.json#"
	},
	"configuration": {
		"type": "object",
		"properties": {
			"configuration": {
				"type": "object",
				"properties": {
					"network": {
						"type": "object",
						"required": [
							"timeout",
							"default_retryIn"
						],
						"properties": {
							"timeout": {
								"type": "number",
								"description": "Single resource downloading timeout in seconds"
							},
							"default_retryIn": {
								"type": "number",
								"description": "Default value of GET retry delay in seconds on HTTP/202, when no "Retry-After" header field is returned in the response."
							}
						}
					},
					"storages": {
						"type": "object",
						"required": [
							"apps",
							"apps_storage",
							"apps_tmp"
						],
						"properties": {
							"apps": {
								"type": "string",
								"description": "Path to the persistent storage for downloaded applications top dir"
							},
							"apps_storage": {
								"type": "string",
								"description": "Path to the persistent storage for downloaded applications persistent storage top dir"
							},
							"apps_tmp": {
								"type": "string",
								"description": "Path to the temporary storage for applications being downloaded"
							}
						}
					}
				},
				"required": [
					"timeout",
					"storages"
				]
			}
		}
	}
}
Code Block
languageyml
titleLISA plugin configuration example
{
	"$schema": "plugin.schema.json",
	"jsonrpc":"2.0",
	"info": {
		"title": "Local Inventory & Storage Manager of DAC Apps (LISA) Plugin",
        "class": "Lisa",
		"callsign": "org.rdk.dac.lisa",
		"locator": "libWPEFrameworkLisa.so",
		"status": "alpha",
		"autostart": true,
		"description": [
			"The Local Inventory & Storage Manager of DAC Apps (LISA) plugin allows authenticated downloading and management of DAC bundles from a remote server. It also manages the persistent storage of the DAC applications."
		],
		"version": "1.0"
	},
	"interface": {
		"$ref": "{interfacedir}/lisa.json"
	},
	"configuration": {
		"storages": {
			"apps": "/mnt/apps",
			"apps_storage": "/mnt/apps_storage",
			"apps_tmp": "/mnt/apps_tmp"
		},
		"network": {
			"timeout": 1800,
			"default_retryIn": 300
		}
	}
}

Development Phasing

  • Phase 1: basic API implementation and libs integration:
    • initialization with basic recovery on errors (removal of all data)
    • installation
      • libcurl HTTP get with HTTPS and TLS session resumption
      • HTTP code 202 back-off
      • persistent storage creation
      • untarring downloaded package
      • no authentication
      • no full metadata support (i.e. auxmetadata and resources)
      • handling of multiple versions of the same application
      • timeout is excluded
    • uninstall
      • full wipeout
    • operationStatus
      • basic status Success/Error
    • getStorageDetails
      • no params (overall) Request payload: {}
      • single installed application Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>"}
    • getList:
      • no filters
      • single app  {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>"}
    • getMetadata
      • single app Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>", "version":"<string>"}
    • getProgress
    • auth module API interface + stub library
    • Configure logical storages on all plaforms
    • Locking support (lock, unlock, getLockInfo) to prevent app from being removed while in use. LISA API Extension (Locking mechanism)
  • Phase 2: whole API
    • full initialization with cleanup and maintenance added (already done)
    • cleanup and maintenance after each operation (already done for install and uninstall)
    • installation
      • full metadata
      • configurable download timeout implementation
    • persistent storage management (full)
      • creation/deletion/reset
      • quota management and enforcing (TBD how and where)
      • usage reporting: per app, overall
    • download
    • reset
      • "storage"
      • "full"
      • "resources"
    • getStorageDetails
      • single installed application Request payload: {"type":"application/vnd.rdk-app.dac.native", "id":"<string>"}
    •  getList
      • filtering (already done)
    • setMetada (already done)
    • cancel (already done)
    • Configure quotas in AS/FSM
    • Review logical storages requirements
      • separately for all platforms
        • Phase 2: all supported platform
  • review for all platforms: gaps
  • Phase 3/later: 
    • TBD if needed: installation with authentication
      • at least API_KEY support
    • TBD: LGI authentication module
      • accessing CDNSharedSecret (check cat /mnt/secure_storage/cwmp/cwmp.xml | grep CDNSharedSecret)
    • TBD: apps.db - authentication, antirollback, encryption
    • TBD: concurrent parallel downloads

UI/resident app:

  • reaction on quota exceeded

AWC/windows manager:

...