Versions Compared

Key

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

Table of Contents

...

Responsibility of LISA service

LISA component is part of RDK DAC framework on STB and is an abbreviation for Local Inventory & Storage Manager of DAC Apps. 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

current git repo location :  https://github.com/rdkcentral/LISA

...

  • 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

Example usage of LISA

logs of LISA in action in real 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.

https://drive.google.com/file/d/11QXXM9WBg8Sw76Eikg5FyodrpIfoBnkL/view

...

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 LISA for downloading installing/deleting DAC bundles. It is a consumer of LISA api.

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.TODO: Point to code where in resident UI of VA LISA is used (on RDK6.1 VA image) 

Detailed LISA design

LISA Storages 

...

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

...