haskell-distributed / distributed-process-client-server Goto Github PK
View Code? Open in Web Editor NEWCloud Haskell - gen_server implementation
Home Page: http://haskell-distributed.github.io
License: BSD 3-Clause "New" or "Revised" License
Cloud Haskell - gen_server implementation
Home Page: http://haskell-distributed.github.io
License: BSD 3-Clause "New" or "Revised" License
I may be doing something wrong, but I'm having trouble getting this to build with GHC 8.
as we don't know the implementation ahead of time, we should guard for that.
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.
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.
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.
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?
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.
Prioritised processes need more attention, as do external handlers.
This is possible now, but awkward and unpleasant. And probably will be a nightmare to test. sigh
I think this requires calling reconnect
and it should be in here already, but I'll double check. Via @agentm on IRC afaik.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.