Uploaded image for project: 'Hot Rod Native client'
  1. Hot Rod Native client
  2. HRCPP-412

Remote task execution usability issues

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 8.1.1.Final
    • .NET
    • None

      There are a couple of usability issues:
      1) The Execute method accepts a dictionary of parameters which has to be there even though no parameters are needed:

      testCache.Execute(scriptName, scriptArgs);
      

      It would be nice if the user could pass a null in the place of scriptArgs, currently it throws the following error when I try it:

       System.NullReferenceException : Object reference not set to an instance of an object.
      4:    at Infinispan.HotRod.Impl.RemoteCacheSWIGGenImpl`2.Execute(String scriptName, IDictionary`2 dict) in Y:\src\main\cs\Infinispan\HotRod\Impl\RemoteCacheSWIGImpl.cs:line 253
      

      2) The arguments to the scripts must be marshaled in a specific way beforehand:

      byte[] bvalue = marshaller.ObjectToByteBuffer("argValue1");
      string svalue = System.Text.Encoding.UTF8.GetString(bvalue);
      scriptArgs.Add("argsKey1", svalue);
      testCache.Execute(scriptName, scriptArgs);
      

      It would be nice to have the marshaler handle the marshaling transparently so that the user could use something like this:

      scriptArgs.Add("argsKey1", "argValue1");
      

            vrigamon@redhat.com Vittorio Rigamonti
            mgencur Martin Gencur
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: