changed 5 years ago
Linked with GitHub

HC-Admin ADR

Purpose:

This app is ment to be a way for any Holochain User to install an App on his/her Local Machine/Device.

Use of HCAdmin-GUI:

This is only used for :

  • Installing Holochain Apps.
  • Uninstalling Holochain Apps.
  • Starting / Stoping Apps.
  • Connect different UIs ???
  • Bridging to Other Holochain Apps.

App Architecture :

Current Stack

  • Electron
  • React

Metrics Displayed :

Current Architecture:

  • [x]CPU Usage %
  • [x]Memory Usage %
  • [x]Apps Bridged to
  • [x]Apps Bridged from
  • [x]DNA of App
  • [x]URL Port : TBD - based on UI Container.

Future Architecture Additions/Changes (with HC-Rust-Container)

  • Running Apps : Discovered by interfacing with the HC-Rust-Container. This will replace the url ports in current version.
  • Network Usage %
  • PeerViz (Visual of others and self in network.)

Questions:

1.) How to track which apps are running in the conatiner

​​​​    Call the following Container API call: info/instances

2.) How track which apps are bridged to one another

​​​​   Call the following Container API call: 

3.) In HC-Rust is there a difference between installing and running an app?

General Qs about Rust during development of App:

1.) Is there going to be another set of tools for devs to run dev mode?
2.) What is status on hApps Specs >> How can we help?

​​​​    The container can currently access and deliver:
​​​​      1. App DNA
​​​​      2. Agent ID

​​​​    Still needs:
​​​​      1. Bridging to
​​​​      2. Bridging from
​​​​      3. Network Stats

Functionality:

  • Install DNAs
  • Install UI
  • Uninstall dna
  • Uninstall UI
  • Bridge apps
  • Run DNA
  • Stop DNA

App Specific Functions:

  • get all DNA running
  • Get stats from each DNA (including bridging info)

Requirements from the container

Existing functionality

  • Retrieve list of running instances (agent + DNA) info/instances
  • Call a function on a running instance id/zome/cap/fn

Functionality to add

  • List installed DNAs info/dnas
  • Install DNA - modifies the config to include a new entry with a DNA { theDNA } admin/install
  • Uninstall DNA - destroys all instances
  • Create Instance - optionally takes an agent id and starts running a DNA { networkID?, dnaHash, agentId?, logger?, store?, network? }, 'admin/start'
    • network ID is added to the DNA upon loading it in the to container to fork different networks
  • Start Instance
  • Stop Instance
  • Retrieve Bridged App Info (*Bridged From and Bridged To)

Important for holo

  • Retrieve statistics on instances for holo/hcadmin

Use Case for Installing App

Note: The files are transferred from the download directory into the .holochain directory, wherein all the binary instances of hApps live.

sequenceDiagram
    participant hs as HApp-Store
    participant hca as HCAdmin
    participant hab as HC Container (Habitat)
    participant uic as UI Container
    participant lhd as Local HD
    participant user as User
        
    hs ->> lhd : downloads hApp bundle to /.hcadmin/downloads
    hca ->> lhd : detects new bundle
    
    Note over hca : Case 1 : bundle <br> includes .hcpkg
    hca ->> hab : update the container.config.toml 
    hca ->> hab : Make Habitat API calls `admin/install` (figure out the other api calls required ) ***
    
    Note over hca : Case 2 : bundle <br> includes UI static
    hca ->> uic : update the ui.config.toml(TBD) 
    hca ->> uic : INSTALL (the installation process depends on the process to host the ui (rust container??) ???)

Required App Bundle Files in download directory:

  • DNA
  • UI
  • Text File
Select a repo