distributed-closure

所属分类:其他
开发工具:Haskell
文件大小:0KB
下载次数:0
上传日期:2023-11-27 11:35:27
上 传 者sh-1993
说明:  分布式编程的可序列化闭包。
(Serializable closures for distributed programming.)

文件列表:
.buildkite/ (0, 2023-11-27)
.buildkite/pipeline.yml (117, 2023-11-27)
CHANGELOG.md (1115, 2023-11-27)
LICENSE.md (1532, 2023-11-27)
Setup.hs (46, 2023-11-27)
default.nix (757, 2023-11-27)
distributed-closure.cabal (2259, 2023-11-27)
examples/ (0, 2023-11-27)
examples/ClientServer.hs (4161, 2023-11-27)
nix/ (0, 2023-11-27)
nix/nixpkgs/ (0, 2023-11-27)
nix/nixpkgs/default.nix (281, 2023-11-27)
shell.nix (83, 2023-11-27)
src/ (0, 2023-11-27)
src/Control/ (0, 2023-11-27)
src/Control/Applicative/ (0, 2023-11-27)
src/Control/Applicative/Static.hs (839, 2023-11-27)
src/Control/Comonad/ (0, 2023-11-27)
src/Control/Comonad/Static.hs (1101, 2023-11-27)
src/Control/Distributed/ (0, 2023-11-27)
src/Control/Distributed/Closure.hs (4565, 2023-11-27)
src/Control/Distributed/Closure/ (0, 2023-11-27)
src/Control/Distributed/Closure/Internal.hs (6513, 2023-11-27)
src/Control/Distributed/Closure/TH.hs (5739, 2023-11-27)
src/Control/Monad/ (0, 2023-11-27)
src/Control/Monad/Static.hs (1361, 2023-11-27)
src/Data/ (0, 2023-11-27)
src/Data/Functor/ (0, 2023-11-27)
src/Data/Functor/Static.hs (1424, 2023-11-27)
src/Data/Profunctor/ (0, 2023-11-27)
src/Data/Profunctor/Choice/ (0, 2023-11-27)
src/Data/Profunctor/Choice/Static.hs (701, 2023-11-27)
src/Data/Profunctor/Static.hs (1332, 2023-11-27)
src/Data/Profunctor/Strong/ (0, 2023-11-27)
src/Data/Profunctor/Strong/Static.hs (661, 2023-11-27)
tests/ (0, 2023-11-27)
tests/test.hs (8272, 2023-11-27)

# distributed-closure [![Build status](https://badge.buildkite.com/6fa836ad49cc34388f0db7b65c59ee8a269c89d309b959c55b.svg?branch=master)](https://buildkite.com/tweag-1/distributed-closure) Leverage the `-XStaticPointers` [extension][staticpointers-extension] from GHC 7.10 onwards for distributed programming using lightweight serializable closures. This package implements a *serializable closure* abstraction on top of static pointers. Serializable closures can be shipped around a computer cluster. This is useful for implementing intuitive and modular distributed applications. See [this blog post][ocharles-static-pointers] for a hands on introduction and [this paper][ch-paper] for the original motivation. [staticpointers-extension]: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#static-pointers [ocharles-static-pointers]: https://ocharles.org.uk/blog/guest-posts/2014-12-23-static-pointers.html [ch-paper]: http://research.microsoft.com/en-us/um/people/simonpj/papers/parallel/remote.pdf # Example In GHC 8 and above, remoting a computation on another node using this library goes along the lines of ```Haskell data NodeId -- Assume we're given a spaw primitive. spawn :: NodeId -> Closure (IO ()) -> IO () -- A computation to remote on another node. hello :: String -> IO () hello name = putStrLn ("Hello, " ++ name) main = do name <- getLine spawn "someAddress" (static hello `cap` name) ``` An example of sending static pointers and closures through a communication channel is provided under [examples/ClientServer.hs](examples/ClientServer.hs) in the source repository. `distributed-closure` does not implement sending/receiving/spawning closures - that's left for higher-level frameworks. Only closure creation, composition and (de)serialization.

近期下载者

相关文件


收藏者