Giter Site home page Giter Site logo

haskell-distributed / distributed-process-client-server Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 11.0 511 KB

Cloud Haskell - gen_server implementation

Home Page: http://haskell-distributed.github.io

License: BSD 3-Clause "New" or "Revised" License

Haskell 100.00%

distributed-process-client-server's People

Contributors

3noch avatar acentelles avatar agentm avatar dpwiz avatar ericbmerritt avatar facundominguez avatar hyperthunk avatar mboes avatar peti avatar qnikst avatar sdiehl avatar tavisrudd avatar vaibhavsagar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

distributed-process-client-server's Issues

Support GHC 8

I may be doing something wrong, but I'm having trouble getting this to build with GHC 8.

Compiler should enforce rules for prioritised processes

Currently it's possible to pass a process definition containing handleExternal or handleControlChannel to pserve, but this will fail at runtime with something like ExitOther "IllegalControlChannel". It would be better if the compiler enforced this distinction, so instead of embedding ProcessDefinition inside of PrioritisedProcessDefinition, I think we should copy the fields across (and rename them) so we can avoid this. I might be necessary to move external handlers out of the apiHandlers group to achieve this, but I think that's a price worth paying for the additional type safety.

Prioritised process mailbox handling can block indefinitely

To simulate this, create a sender that simply goes forever $ cast serverPid () and watch your machine run out of memory (while not much else happens).

Control flow has never been part of Erlang's gen_server API, and neither should it be applicable here. However, we won't have a change to notice that we're overloaded if the server never gets around to responding to any of its inputs, and that's what is happening here.

We enter a loop to drain the mailbox, but do not break out of it. There is a policy item that references this situation, but the pserve implementation ignores it!

Notes: this is only broken for prioritised mailboxes, and will be a fairly simple fix.

`handleExternal` support

So we can compose STM actions inside a managed process definition, allow clients and servers that reside on the same node to communicate over STM channels, queues, etc.

Should we tidy up compiler warnings?

I get lots of warnings that we should be using MonoLocalBinds when compiling. Should I add these flags to avoid the compiler warnings, which are mainly about the use of Serializable a in type signatures?

safeCall blocks on large payloads

Hello wonderful people contributing to this project :)

I'm writing a distributed compiler using the client/server abstraction and ran into an issue with calls to safeCall (or other versions of call) not showing up on the server side.

Here is a reduced version (literally made by slicing down the existing project) capable of reproducing the issue: https://github.com/davnils/kool/tree/testcase
The pinned down dependencies are based on version in this post: https://groups.google.com/forum/#!topic/parallel-haskell/x3y6XNpTEFw

Basically there are executions of the client that end up stalling on call, which seems to occur with greater frequencies for larger payloads. I have reproduced the failing test case on osx but seen similar behaviour on ubuntu.

Any ideas on what could be wrong? Would appreciate any pointers or ideas on debugging the internals.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.