Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Provide MxAgents with a dual state model

オープン
#307 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@hyperthunk がすでに取り組んでいます。

2017年2月13日 から。

評価

この issue はまだ評価されていません。

説明

Feature Request In Progress

It's often the case that whilst initialising an agent might need to wait on other actors, so we should either copy the init >>= serve model from client-server, or provide a dual state monadic environment so we don't have code like this...

data AgentState = Booting | ActualState { f1 = ..., f2 = ... }

-- and inside a listener
startIt = mxAgent agentId Booting [ mxSink handlePeersReady, mxSink handleEvent ]
where
  handleEvent Booting = mxSkip 
  handleEvent ActualState{...} = ...

And worse still, have to worry about the boot state when you're buried in implementation code...

forwardToServer _   HBAgentBoot = liftMX terminate  -- state invariant
forwardToServer ev' HBAgent{ hbServer = sPid }
                                = liftMX (send sPid ev') >> mxReady

handleRestarts _   HBAgentBoot = liftMX terminate   -- state invariant
handleRestarts pid sta@HBAgent{ hbServer = sPid' }
        | pid == sPid' = restartBoth sta
        | otherwise    = mxReady

On the other hand, we want this API to remain as simple as possible, since here we're providing service and utility, and policy belongs elsewhere.

主要言語
Haskell
スター
753
フォーク
101
平均マージ
1日 3時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

haskell-distributed/distributed-process のほかの issue

haskell-distributed/distributed-process の issue をすべて見る

似ている issue

Haskell の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。