Git Product home page Git Product logo

rip-labview-server's People

Contributors

dictino avatar jcsombria avatar ravenink avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rip-labview-server's Issues

Add support for private variables

It should be possible to mark one or more variables as "private". These variables should not be readable nor writable by the clients, as they are internal variables needed for the program but of no interest to clients.

Special characters in strings

Strings in Global_Configurations.vi are copied to json without escaping special characters.

Example: http://localhost:8080/RIP?expId=TestOK Produces a good json response, that's fine.

But if "Description" field is changed from the current value "TestOK" to:

"Description in
two lines"

Then the resulting json is ill formed.

The same occurs with other fields like "Name", "Authors", "Keywords" and so on...

We actually have BasicMethods/Sub_methods/Escape_json.vi that implements the escaping logic used in get method, maybe @jcsombria knows where to place this block to solve the issue.

Adding JSON Patch support?

JSON Patch is a format for describing changes to a JSON document: http://jsonpatch.com/

Adding support for JSON Patch would allow the RIP LabView server to only send those variables that have changed since the last event was sent to the client, reducing network load. Right now, the server sends the whole JSON document, containing all variables and their respective value each time, even if only one of those variables' value (typically, the time) has changed.

Do you think we should implement this? A similar alternative would be to send a smaller JSON with just the variables that have changed since the last event, but since the JSON format exists, it would probably be better to use this standard.

Missing implementation of basic methods

Methods:

  • get(expid, vars) -> expid = "id", variables = ["x", "y", ...]
  • set(expid, variables, values) -> expid = "id", variables = ["x", "y", ...], values = ["10", "a", ...]
  • start(expid) -> expid = "id"
  • stop(expid) -> expid = "id"

Complete SSE integration

The SSE LabView service needs to receive the experience identifier and the list of indicators.

This involves two tasks:

  1. Modify the get method to accept empty arrays. In such case, get should return all indicator values.
  2. Modify the SSE webservice to accept expId and variables query parameters.

Extend description of experience returned by method info(expid)

Currently, the method info(expid) gives a list of controls/indicators and their types, but it would be nice to have an extended description:

{
  'info': {
    'name': 'The name of the experience',
    'description': 'A short description of the experience',
  },
  'methods':{
    'get':{
      'purpose':'The purpose of the method',
      'params':['variables':'[string]'],
    }
    ...
  },
  'readables':[['x','y',...],['number','string',...]],
  'writables':[['z','t',...],['number','string',...]],
}

Improve the send-on-delta policy

At the moment, three events can be sent:

  1. All data (all variables) from the lab are sent to the client on a periodic basis.
  2. A heartbeat with no relevant information might be sent every X seconds.
  3. All data (all variables) are sent when the change of a particular variable is bigger than a certain threshold.

There are several improvements to be made:
First, 1) is a subcase of 3).
Second, the value of the threshold (Delta) should be parametrizable both by the lab owner and the client.
Third, right now the variable which change is compared to the threshold is selected by the lab owner in a very ugly way. It should be clean and easy and the client should be able to selected it too.
Fourth, the period for which the Delta condition is checked should also be parametrizable both by the lab owner and the client. The first one is already done, but at the moment this value is set for all experiences defined in the RIP server, but it should be possible to give it different values for each one.

Basic web services communications with clients

The communication method should be such as:

  1. Clients upload information to the server (the VIs they are communicating with) via POST.
  2. Clients download information from the server (the VIs they are communicating with) via SSE (which are generated in the server side).

Server can't correctly parse JSONRPC numbers

Currently, the server accepts:
"{..., "params":["expid","stringin","intin"],["hola", "2"]], ...}"
instead of:
"{..., "params":["expid","stringin","intin"],["hola", 2]], ...}"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.