haskell-distributed / haskell-distributed/distributed-process

[DP-12] Move logging infrastructure out of the core

Open
#92 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

[Imported from JIRA. Reported by Tim Watson [Administrator] @hyperthunk) as DP-12 on 2012-12-17 12:19:35]

I would propose that we provide the basic infrastructure to register logging handlers in distributed-process-platform and build on that to add additional capabilities. Another option is to create a new distributed-process-logging package, but I'd really like to build this on top of gen-server/gen-event stuff we're building into -platform personally.

The only problem I can see with that approach is for example with SimpleLocalNet which replaces the logger process on its slaves with one that relays the messages back to the master. Erlang does something similar in its slave module by redirecting all stdout back to the master.

The obvious solution I can see to this, is to go ahead and move the logging infrastructure, then take the master/slave stuff out of SimpleLocalNet and put it into another package that depends on SimpleLocalNet and on -platform. That's still not quite a clean API design though, because there's an implicit dependency on a specific backend which seems unusual to me.

If someone can come up with an alternative that still allows backends to provide this kind of functionality without creating a tangled mess of dependencies then I'm all ears. Currently the backends do not seem to depend on distributed-process at all, which makes sense. I can't see how we'd do CH logging without the Process monad so I'm questioning whether it really makes sense for backends to have this capability at all?

Perhaps this requires some thought about the packaging requirements for CH and how we go about making it easy for developers to work with.

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.

Research direction

Start by mapping the current logging infrastructure, SimpleLocalNet, and the gen-server/gen-event work across the repository; the issue names no files or tests. Review the package dependencies and backend boundaries first, then define a package layout and API that separates logging from master/slave behavior without tangled dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
distributed-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.