Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Initial Structure #14

Merged
merged 10 commits into from Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .editorconfig
@@ -0,0 +1,8 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_size = 2
indent_style = space
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
/target
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion .idea/seeder.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .rustfmt.toml
@@ -0,0 +1 @@
tab_spaces = 2
223 changes: 223 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
@@ -0,0 +1,4 @@
[workspace]
members = [
"cli",
]
15 changes: 7 additions & 8 deletions README.md
Expand Up @@ -10,7 +10,7 @@
<br>
</p>
<p align="center">
An easy, blazingly fast, and reliable Chia plot manager for your farm
🌱 Easy to use, blazing-fast, and reliable Chia plot manager for your farm
</p>

# Chia Seeder
Expand All @@ -26,13 +26,12 @@ An easy, blazingly fast, and reliable Chia plot manager for your farm
Any farmer managing multiple HDDs knows how hard it is to manage all its plotting processes. This job can be even more difficult if you're managing more than one rig. This tool aims to make it easier for farmers to manage their plot processes by:

* Having a single, centralized configuration
* Allowing a single server to control multiple client
* Enabling staggering start of plot process based on a manually provided number of minutes
* Allowing plot processes to be bootstrapped as soon as the previous plot reaches a given phase (hooks)
* Hooking external processes as soon as your plot process enters a given phase
* Early start new plot processes when the previous process enters the last phase
* `UNDER DEVELOPMENT` Plotting from your seeder rig directly into your farm over your private network
* `UNDER DEVELOPMENT` Automatically optimizing your configuration to achieve maximum efficiency given your rig's hardware
* `UNDER DEVELOPMENT` Distribute plot process from a centralized server across multiple clients (a single server node can manage multiple seeder rigs)
* Allowing plot processes to be launched based on phase hooks
* Hooking external processes with phase transitions
* Early starting new plot processes when the previous enters the last phase
* Automatically detecting disk usage, preventing plots to be started if the target usage was already met

## Quickstart

Expand All @@ -59,4 +58,4 @@ Contributions are what make the open-source community such a fantastic place to
This repository is distributed under the Apache 2.0 License. See [`LICENSE`][license] for more information.

[contributing]: CONTRIBUTING.md
[license]: LICENSE
[license]: LICENSE
12 changes: 12 additions & 0 deletions cli/Cargo.toml
@@ -0,0 +1,12 @@
[package]
name = "chia-seeder-cli"
description = "🌱 Easy to use, blazing-fast, and reliable Chia plot manager for your farm"
version = "0.1.0"
authors = ["delucca <delucca@pm.me>"]
edition = "2018"
repository = "https://github.com/delucca/chia-seeder/"
readme = "README.md"
license = "Apache-2.0"

[dependencies]
structopt = "0.3"
1 change: 1 addition & 0 deletions cli/src/interface/mod.rs
@@ -0,0 +1 @@
pub mod opts;
11 changes: 11 additions & 0 deletions cli/src/interface/opts.rs
@@ -0,0 +1,11 @@
use structopt::StructOpt;

#[derive(StructOpt, Debug)]
#[structopt(
name = "chia-seeder",
about = "🌱 Easy to use, blazing-fast, and reliable Chia plot manager for your farm"
)]
pub struct Global {
#[structopt(short, long)]
debug: bool,
}
8 changes: 8 additions & 0 deletions cli/src/main.rs
@@ -0,0 +1,8 @@
mod interface;

use structopt::StructOpt;

fn main() {
let global_opts = interface::opts::Global::from_args();
println!("{:#?}", global_opts);
}
5 changes: 3 additions & 2 deletions doc/adl/0000-index.md
Expand Up @@ -7,7 +7,8 @@

## Accepted ADRs

* [None](#)
* [0001 - Rust](./0001-rust.md)
* [0002 - Base Architecture Pattern](0002-base-architecture-pattern.md)

## Proposed ADRs

Expand All @@ -19,4 +20,4 @@

## Deprecated ADRs

* [None](#)
* [None](#)
41 changes: 41 additions & 0 deletions doc/adl/0001-rust.md
@@ -0,0 +1,41 @@
# Rust

* **Status:** accepted
* **Deciders:** [delucca](https://github.com/delucca/)
* **Date:** 2021-06-21

## Context and Problem Statement

The first major decision regarding our project is defining our primary programming language. The tool we're building is primarily a command-line tool. Also, since this is a side-project (at least for now), the programming language should be interesting enough to motivate me to work in the project.

This tool is going to be used in computers with high loads. So, the final binary size and the required amount of resources should be small enough to avoid impacting the plotting speed.

Since the project is just starting, it is hard to know the future requirements that we should face. But, I see clearly that we could implement a GUI, or even a web interface, in a near future. So, the programming language should allow us to modularize our program properly, creating different specialized scopes.

## Decision Drivers <!-- optional -->

* Fast and small, to avoid impacting plotting speed
* An interesting language (something that I want to learn/improve)
* Be able to modularize the project properly

## Considered Options

1. Rust
2. Python
3. Go

## Decision Outcome

Chosen **option 1**, because Rust has a pretty impressive performance, with small final binaries, which is something that could potentially improve the usage of our tool. Also, Rust is a language that I've been waiting the perfect time to apply. It is pretty clear for anyone in the community that command-line tools are where Rust shines the most, so that's a pretty good fit with our project.

### Positive Consequences <!-- optional -->

* Our tool would be really fast
* We can use some primitives and complex structures from the computer
* It is extremely easy to modularize
* I have a huge interest to learn this language, which can motivates me

### Negative Consequences <!-- optional -->

* It's a complex language
* Probably we should lack of collaborators in the near future