Support different de/serialization strategies
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- haskell
- Lĩnh vực
- distributed-systems
Hướng nghiên cứu
Bắt đầu bằng cách đọc abstraction Process hiện tại và entry point send để hiểu serialization dựa trên Binary được kết nối như thế nào. So sánh API đó với strategy Serialize được đề xuất và MimeRender/MimeUnrender của Servant; công việc được xem là hoàn tất khi đã thống nhất về abstraction và cập nhật các type cùng example bị ảnh hưởng mà không làm hỏng các chương trình không phụ thuộc vào serialization.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Haskell
- Star
- 753
- Fork
- 101
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của haskell-distributed/distributed-process
-
failed to build with time-1.15Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
enhancement Feature Request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
haskell-distributed/distributed-process#486 · 1 bình luận · 1 reaction ·
-
enhancement Feature Request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
haskell-distributed/distributed-process#476 · 2 reaction ·
-
Demonstrating the use of Cloud Haskell for a Raft implementationCó thể làm lại được @LaurentRDC đã nhận 481 ngày trước và không có pull request nào đang mở. Đang mởenhancement Feature Request
haskell-distributed/distributed-process#475 · 3 reaction · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
haskell-distributed/distributed-process#473 · 4 bình luận · 1 reaction ·
Tất cả issue của haskell-distributed/distributed-process
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
objectionary/phino#2059 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
NixOS/nixpkgs-update#586 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
wireapp/wire-server#5632 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
koalaman/shellcheck#3593 ·