tari-project / tari-launchpad

A node, wallet and miner for Tari focusing on ease of use
BSD 3-Clause "New" or "Revised" License
8 stars 15 forks source link

feat: sdm crate for managing containers #180

Closed therustmonk closed 1 year ago

therustmonk commented 1 year ago

Description

Adds crates (sdm and sdm-launchpad) that automatically manages containers. The implementation uses a bus instead of direct api calls and provides a state with deltas that should be rendered on UI. Unlike the original solution, this one uses independent tasks to watch for containers and launch necessary services in proper time: like GRPC clients.

This approach helps to solve many issues like: base node failed to start as tor wasn't available (bootstrapping lasted longer), and could solve many issues automatically with detailed reporting about problems. The main reason why BUS approach is better than API, because API calls are good for independent tasks that could be successfully performer at any given time, like a system call to create a new file. The launchpad app is not a plain service and has to fulfill many conditions. For example, we can't have a simple get_balance API method, because it depends on:

The conditions above are too complex to have a plain API method and checking them on UI side force us to forward all the raw data from docker to the UI that is not the best part for doing that tricky checks.

Motivation and Context

Improved docker management and dependencies management for containers based on #177 Improve the reliability of the application.

How Has This Been Tested?

Manually

stringhandler commented 1 year ago

utACK

sdbondi commented 1 year ago

utACK

brianp commented 1 year ago

utACK