haskell-distributed / haskell-distributed/distributed-process

Mailbox should not constantly deserialize mesages.

Open
#275 3 comments 0 reactions 1 assignee View on GitHub

@qnikst is already working on this.

Since Mar 1, 2016.

enhancement Question
Dominant language
Haskell
Stars
751
Forks
99
Avg merge
45m
Merged PRs (30d)
2

Description

Current implementation of the CQueue and Match performs decoding on each check of the message, this is may be a huge performance hit for messages that are expensive to decentralize. We may implement solution that will memoise deserialization result.

We may use following approach:
Match could return 3 possible cases Matched a | Decoded b | NotMatch, where Matched a stands for match success, Decoded b stands for - fingerprint matches, but not message, in and deserialised value is returned, NotMatch stands for a case when fingerprint was not match or message is already decoded. Then CQueue implementation will alter CQueue and put decoded message instead of encoded.

It's possible to use Either a b instead where instead of NotMatch Left input will be returned, so queue will always be altered if message was not matched. However we need to check what approach will be cheaper.

CC: @dcoutts, @facundominguez.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.