Support different de/serialization strategies
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- haskell
調査の方向性
まず現在の Process 抽象化と send エントリーポイントを読んで、Binary ベースのシリアライゼーションがどのように組み込まれているかを理解します。その API を、提案されている Serialize 戦略および Servant の MimeRender/MimeUnrender と比較します。完了の条件は、抽象化について合意し、シリアライゼーションに依存しないプログラムを壊すことなく、影響を受ける型と例を更新することです。
索引モデルが issue の本文から書いたものです。
説明
Currently, all messages are de/serialized via the Binary instance.
This is an implementation detail; there is strict required beyond the existence of two functions, encode :: a -> ByteString and decode :: ByteString -> Either String a. However, discussions in the DataHaskell group have raised the point that serialization for data science structures (e.g. dataframes) could be made more efficient by leveraging Parquet over the wire.
I'm thinking of an extension of the current Process monad, to support also a de/serialization strategy. This is strongly inspired by Servant's MimeRender and MimeUnrender classes. Consider:
newtype Process strategy a = Process ... -- Monad is unchanged, type has a new `strategy`
class Serialize strategy a where
encode :: Proxy strategy -> a -> ByteString
decode :: Proxy strategy -> ByteString -> Either String a
An example for JSON would be:
import Data.Aeson
data JSON
class (ToJSON a, FromJSON a) => Serialize JSON a where
encode _ = encode
decode _ = eitherDecodeStrict
Then, for the actual message sending e.g. via send, the type would become:
send :: Serialize strategy a => ProcessId -> a -> Process strategy ()
Then, programs that are agnostic of serialization are of type Process strategy a (instead of Process a), while programs which require a specific serialization method, such as JSON, will be of type Process JSON a.
- 主要言語
- Haskell
- スター
- 753
- フォーク
- 101
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
haskell-distributed/distributed-process のほかの issue
-
enhancement Feature Request
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
haskell-distributed/distributed-process#486 · コメント 1 件 · リアクション 1 件 ·
-
enhancement Feature Request
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
haskell-distributed/distributed-process#476 · リアクション 2 件 ·
-
Demonstrating the use of Cloud Haskell for a Raft implementation再び着手できるかも @LaurentRDC が 481 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement Feature Request
haskell-distributed/distributed-process#475 · リアクション 3 件 · 担当者 1 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
haskell-distributed/distributed-process#473 · コメント 4 件 · リアクション 1 件 ·
-
enhancement network-transport-tcp newcomer
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
haskell-distributed/distributed-process の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
objectionary/phino#2059 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
NixOS/nixpkgs-update#586 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
wireapp/wire-server#5632 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100