Skip to content
Snippets Groups Projects
  1. Feb 25, 2013
    • Iustin Pop's avatar
      Improve the rpc-test program · b9b4f1bf
      Iustin Pop authored
      
      This is an ugly patch, sorry. It adds the following features to
      rpc-test, to help with (stress) testing the Haskell RPC client:
      
      - customisable repeat count for the RPCs
      - customisable parallelisation factor
      - options to show timing stats and other information
      - capability to execute any RPCs already defined, as opposed to having
        the RPC hardcoded; this requires a data file (defaulting to
        "rpc.json") that has the serialised RPC call
      
      The polymorphism/way the RPC library is implemented requires us to
      have some duplicate code (operating on different types); I wasn't able
      to found a way to make this more abstract.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      b9b4f1bf
    • Iustin Pop's avatar
      Implement Export queries in Haskell · c4bf507b
      Iustin Pop authored
      
      This is a simple query as it has only two fields, however it's the
      first query that doesn't have a clear 'base' object and 1:1
      correspondence between such objects and the results (groups, nodes and
      networks do so).
      
      We keep nodes as the 'base' object, since that's what we want to
      filter on for RPC selection, and we have a very simple type as the
      runtime type, since we only have one other field. The
      'collectLiveData' function is the one that does the expansion from
      [node] to [(node, path)], with the help of 'rpcExtractor'.
      
      Also, this patch introduces a slightly different naming structure for
      the exported names out of the module, to reduce naming conflicts.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      c4bf507b
    • Iustin Pop's avatar
      Fix exports query with failed RPCs · 0b1c7a55
      Iustin Pop authored
      
      When the RPC to a node has failed (for whatever reason), we currently
      return _FS_UNAVAIL, which means "this node doesn't support
      exports". However, that is misleading: all nodes support exports, but
      we failed to list them at the moment, so _FS_NODATA (temporary
      failure) is more appropriate here.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      0b1c7a55
    • Iustin Pop's avatar
      Add export_list RPC call definitions · 842515dd
      Iustin Pop authored
      
      This is straightforward, as the call has no parameters and a very simple return type.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      842515dd
    • Iustin Pop's avatar
      Improve TemplateHaskell code to support empty objects · 08f7d24d
      Iustin Pop authored
      
      Currently, an empty objects will generate warnings as the arguments of
      various functions are unused. By adding conditional code for this, we
      can support generation of empty objects, e.g. like needed in Rpc code.
      
      Additionally, the patch also converts RpcCallVersion to THH, now that
      it can build it. We change the serialisation for this (from JSNull to
      JSObject []), but this shouldn't matter as this is not used in
      production.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      08f7d24d
  2. Feb 22, 2013
  3. Feb 21, 2013
  4. Feb 20, 2013
  5. Feb 19, 2013
Loading