-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Actual (現状)
Currently, subscriber IDs and published messages are managed in two places, for SocketPublishSubscribe-commands and HTTPStreaming-commands.
So, published messages are delivered to correct subscribers by two similar codes in different layers. They should be unified to a "manager" class.
- messages for SocketPublishSubscribe commands: delivered by codes in lib/adapter/socket.io.js (the framework)
- messages for HTTPStreaming commands: lib/adapter/command.js (a specific command)
SocketPublishSubscribe型のコマンドとHTTPStreaming型のコマンドとで、subscriberとpublished messagesを別々に管理している。
published messageが届いた時に、対応するsubscriberに対してだけそのメッセージを配信する、という処理を、それぞれ別々のレイヤで管理している。
- SocketPublishSubscribe型のコマンド → lib/adapter/socket.io.js のレイヤ(フレームワーク)
- HTTPStreaming型のコマンド → lib/adapter/command.js のレイヤ(各コマンド固有の処理)
Expected (期待される状態)
- They are managed by a single "manager" class.
- We don't have to write delivering system for many times.
- subscriberとpublished messagesの管理が一元化されている。
- 対応するsubscriberに対してだけメッセージを配信する、という処理をその都度書かなくてもよいようになっている。
How to fix (解決方法)
Define a "manager" class and move modes to it.
SocketPublishSubscribe型のコマンド、HTTPStreaming型のコマンド、フレームワークの三者の関係を見直し、subscriberを一元管理するための新しい仕組みを作る。
Reactions are currently unavailable