ANN: remote-json, a JSON RPC library, released

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ANN: remote-json, a JSON RPC library, released

Andy Gill-3
Announcing a new Haskell JSON RPC library, remote-json, that uses the remote monad to bundle remote procedure calls, amortizing the cost of remote execution. There are thee bundling strategies provided: 

 * weak (calls done one at a time), 
 * strong (calls bundled until a reply is needed, where possible), and 
 * applicative (an applicative functor is sent to the remote JSON RPC server).

Example of use:

say :: Text -> RPC ()
say msg = notification "say" (List [String msg])

temperature :: RPC Int
temperature = method "temperature" None

main :: IO ()
main = do
  let s = strongSession $ clientSendAPI "http://www.wibble.com/wobble"
  t <- send s $ do
                say "Hello, "
                say "World!"
                temperature
  print t

_______________________________________________
Haskell mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell