IoT devices only need to pass the mathematical expression and the input values for evaluation to Diafanis. If the mathematical expression doesn't change, the IoT device only needs to give the new input values as required. Diafanis allows IoT devices to scale the number of inputs of their sensing capabilities by moving the computing power required for mathematical calculations to a central platform.
The Eclipse Diafanis web service listens on port 8080 by default. The port can be freely configured. Calculations are then created via HTTPS request.
Example - To create a calculation the IoT device simply calls the following URL:
http://localhost:8080/?call=Diafanis&functionString=-sin(x*cos(x))^(1/y)&numberOfVariables=2&variables=x;y&values=0.5;2&interval=yes
This creates a calculation object for the function "-sin (x * cos (x)) ^ (1 / y)" and immediately performs the calculation with the "2" variables "x; y" for the values "0.5; 2". Variables and values are always separated by a ";". With "interval=yes" it is indicated that in addition to the computer-precise calculation, the upper and lower interval of the calculation is also given. The exact value of the calculation is then in this interval.
In addition, with the calculation you receive a reference to the generated calculation object for the function. From now on you can simply use this reference to get calculations for further values. References are valid for 1 hour, which is extended to 1 hour from the time of access each time a reference is accessed. If only the reference to a calculation object is used, the sometimes very long function does not have to be passed every time. That saves time and computing power.
For example, if you have received a reference "handle_Computation: 2370169936048", simply call up the following URL for a further calculation with the values 0.2 and 2 for x and y:
http://localhost:8080/?call=Diafanis&handle_Computation=2370169936048&values=0.2;2
This allows you to perform complex calculations of any length on the server.