Copyright | (c) Pierre-Étienne Meunier 2014 |
---|---|
License | GPL-3 |
Maintainer | pierre-etienne.meunier@lif.univ-mrs.fr |
Stability | experimental |
Portability | All |
Safe Haskell | None |
Language | Haskell2010 |
Tool to build clients for Parry.
Jobs on the client side
For a job to be usable by Parry's clients, it must be a member of this class.
Writing clients
client :: (Binary j, Client j) => Config -> (Bool -> ([j] -> [j] -> IO ()) -> j -> IO [j]) -> IO () Source
calls its argument function client
config workwork
on a
boolean s
(if the server asked to share jobs) and the actual job
j
that must be done. work
must return a list of resulting jobs,
that may include results (see Client
).
Workers asked to share their input job should share it as early as possible: this usually means that the job already got killed in a previous attempt, probably because of its length.
Client configuration
Config | |
|
defaultConfig :: PrivateKey -> PublicKey -> Config Source
A default configuration, matching the server's
defaultConfig
. Note that, like in the server, you
must provide your own private key for signing the protocol
messages. See defaultConfig
for an example method to
generate these keys.