Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Haskell
Wiki community
Recent changes
Random page
HaskellWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Cloud Haskell
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Migration from <tt>remote</tt> == Here are some suggestions that might ease the migration from the Cloud Haskell prototype <tt>remote</tt> to <tt>distributed-process</tt>. * The "implicit" type of mkClosure has changed (implicit because mkClosure is a Template Haskell function). In <tt>distributed-process</tt> mkClosure takes a function of type <tt>T1 -> T2</tt> and returns a function of type <tt>T1 -> Closure T2</tt>. In other words, the first argument to your function becomes the closure environment; if you want two items in your closure environment, create a function of type <tt>(T1, T2) -> T3</tt>; if you want none, create a function of type <tt>() -> T1</tt>. * <tt>distributed-process</tt> follows the naming conventions in ''Towards Haskell in the Cloud'' rather than in <tt>remote</tt> so the functions that deal with typed channels are called <tt>sendChan</tt>, <tt>receiveChan</tt> and <tt>newChan</tt> instead of <tt>sendChannel</tt>, <tt>receiveChannel</tt> and <tt>newChannel</tt>. * <tt>sendChan</tt>, <tt>receiveChan</tt> (and <tt>send</tt>) never fail in <tt>distributed-process</tt> (in <tt>remote</tt> they might throw a <tt>TransmitException</tt>). Instead, if you want to be notified of communication failure, you need to use <tt>monitor</tt> or <tt>link</tt>. * The function <tt>forkProcess</tt> in <tt>remote</tt> is called <tt>spawnLocal</tt> in <tt>distributed-process</tt> * The <tt>Process</tt> monad is called <tt>Process</tt> in <tt>distributed-process</tt> (rather than <tt>ProcessM</tt>). Similarly, the type <tt>Match</tt> replaces <tt>MatchM</tt> (and is no longer a monad). * Initialization is different. See the documentation of of the [http://hackage.haskell.org/packages/archive/distributed-process-simplelocalnet/latest/doc/html/Control-Distributed-Process-Backend-SimpleLocalnet.html Control.Distributed.Process.SimpleLocalnet] to get started (note that the master/slave distinction in SimpleLocalnet is optional and does not need to be used). * Peer discovery is different. The functions <tt>getPeers</tt> and <tt>nameQuery</tt> are no longer available. The function <tt>findPeers</tt> from <tt>SimpleLocalnet</tt> replaces some, but not all, of the functionality of <tt>getPeers</tt>. You can use <tt>whereisRemoteAsync</tt> to find processes that have been registered by name.
Summary:
Please note that all contributions to HaskellWiki are considered to be released under simple permissive license (see
HaskellWiki:Copyrights
for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!
Cancel
Editing help
(opens in new window)
Toggle limited content width