Skip to content

feat(debug): インメモリ DB でも notes パッケージへの投稿を timeline から取得できるようにする #1173

@MikuroXina

Description

@MikuroXina

Before requesting

  • Checked same request already has not already been reported
  • Understand that this request is not certain to be adopted.

Problem

現状のデバッグ起動時のシステムでは, notes パッケージで新しいノートを追加しても timeline からそれを観測できない. そもそもデータが共有されていない.

パフォーマンスも考慮して notes から timeline へプッシュ型で転送する構造にしたいが, notes が timeline の API を直接使うのは循環依存を生む. これを回避しつつデータを共有する方法を提案する.

Proposed Solution

デバッグ可能性の向上や今後の機能開発の促進のため, 次のような手順で改善する.

  1. notes パッケージに「notes パッケージで起きた新規 (正確にはシステム起動時から新たに見つけた) ノート発行を購読する関数を登録する」という API を追加する.
  2. timeline パッケージの ノートのレポジトリ実装 にて, これを呼び出して購読するように変更する.
  3. その購読処理で, そのノートのレポジトリに新規ノート発行を timeline 側に取り込む.

Other information

この実装は Caramel で予定していた E2E テストシナリオの実行に必要.
pulsate-dev/caramel#299

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions