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

箱庭側の複数機体対応するにはどうしたら良い? #155

Closed
Tracked by #151
tmori opened this issue Feb 14, 2024 · 4 comments
Closed
Tracked by #151

箱庭側の複数機体対応するにはどうしたら良い? #155

tmori opened this issue Feb 14, 2024 · 4 comments

Comments

@tmori
Copy link
Contributor

tmori commented Feb 14, 2024

目的

  • 変更ポイントの把握
  • 改修案の検討
@tmori
Copy link
Contributor Author

tmori commented Feb 15, 2024

変更後のアーキテクチャ

スクリーンショット 2024-02-15 14 39 57

考え方

  • 1つのプロセス(箱庭アセット)で複数機体を実行する
  • さらに、マルチプロセス構成もやれるようにする

変更詳細

  • hako-master:あり/なしを選択できるようにする
  • 受信スレッド:機体毎に用意する
  • asset-runner:アセット名を変更できるようにする
  • 受信バッファ:機体毎に用意する
  • 送信バッファ:機体毎に用意する
  • 物理モデル:機体毎にインスタンス化する

@tmori
Copy link
Contributor Author

tmori commented Feb 15, 2024

構成例

  • 箱庭アセット1
    • 箱庭マスターを実行する
    • 4個の機体のプラントモデルを実行する
  • 箱庭アセット2
    • 6個の機体のプラントモデルを実行する

@tmori
Copy link
Contributor Author

tmori commented Feb 15, 2024

asset runnerは、最新の箱庭アセットAPIに差し替えたほうが良いかも。この機会に。

@tmori
Copy link
Contributor Author

tmori commented Feb 15, 2024

マルチインスタンスの改造ステップ

  1. まずはグローバル変数前提箇所を特定する
  2. グローバル変数を廃止して、インスタンスをベースに処理をするように修正する
  3. インスタンスを作る処理を用意する
  4. 全体制御箇所で各インスタンスをコールするように修正する

@tmori tmori closed this as completed Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant