rpc-framework:在Haskell中遠程方法調用框架

jopen 12年前發布 | 61K 次閱讀 RPC XML-RPC 開發

這是一個框架用于在Haskell中遠程過程調用。

特性:

  • 用法非常簡單

  • 調用一個遠程方法是類型安全的Calling a remote procedure is type safe.

  • Modal logic inspired worlds, aka hosts:

    • Services run from the World IO monad, written Host w => WIO w
    • This allows world specific actions: if one world will be compiled to JS and one to x86, we could have the following types
    putStrLn :: IO_World w => WIO w a     installTextBox :: JS_World w => WIO w () 
  • Arbitrily complex remote procedures:
    • Rather than only being able to call a remote function of one argument, we can call with any number of arguments
    foo :: (Sendable a1 ,..., Sendable aN, Sendable b, Host w) => a1 -> ... -> aN -> WIO w b 
  • It can send pure functions across the wire and now garbage collect them.
    instance (Serializable a) => Sendable a a     
    instance (Sendable a' a, Sendable b b') => Sendable (a -> b) (a' -> IO b') 
  • Only local code can execute

    • unlike some modal logic aproaches to mobile languages, the only code that can be executed is the code you compiled, and not code passed from world to world
  • State can be serialized with references.

項目主頁:http://www.baiduhome.net/lib/view/home/1355467086372

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!