|
@@ -52,14 +52,14 @@ MvK server
|
|
|
The communication with the MvK is a lot easier, as there is only a very minimal interface: the actual interface needs to be explicitly modelled in action language.
|
|
|
Requests have the following form::
|
|
|
|
|
|
- op=OPERATION&username=USERNAME&value=VALUE
|
|
|
+ op=OPERATION&taskname=TASKNAME&value=VALUE
|
|
|
|
|
|
Here, *OPERATION* defines the operation to execute, of which only two exist:
|
|
|
|
|
|
1. *set_input*, which adds the sent value to the input queue of the user;
|
|
|
2. *get_output*, which blocks until there is a value in the output queue of the user.
|
|
|
|
|
|
-Obviously, *USERNAME* specifies the name of the user for which the operation needs to happen.
|
|
|
+Obviously, *TASKNAME* specifies the name of the task for which the operation needs to happen.
|
|
|
|
|
|
The *VALUE* is just a JSON encoded value which will be added to the input queue of the Modelverse.
|
|
|
This is ignored when the *get_output* operation is used.
|
|
@@ -84,9 +84,9 @@ While this list mostly resembles JSON, there are some important differences:
|
|
|
* Action type is new, and contains a string representation (without quotes!) of the action language construct to add
|
|
|
|
|
|
As response, the *set_input* will always receive the same reply if the message was correctly deserialized.
|
|
|
-Receiving a reply does *NOT* mean that a message was consumed by the user, it only means that the message was correctly added to the input queue of that user.
|
|
|
+Receiving a reply does *NOT* mean that a message was consumed by the task, it only means that the message was correctly added to the input queue of that task.
|
|
|
|
|
|
-A *get_output* request blocks until a value is available in the users output queue.
|
|
|
+A *get_output* request blocks until a value is available in the tasks output queue.
|
|
|
The reply to this message will then contain a JSON serialized (with identical remarks as for *set_input*) containing the value that was output.
|
|
|
Note that now the *null* message is possible, in case the node that is being outputted does not contain a value (or is an edge).
|
|
|
|
|
@@ -94,5 +94,5 @@ Performance notes
|
|
|
^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
For performance reasons, sending a huge amount of data to the Modelverse (*e.g.*, a compiled program), should not happen with individual requests for each line.
|
|
|
-To allow for packed messages, users can ignore the *value* parameter, and use the *data* parameter instead.
|
|
|
+To allow for packed messages, tasks can ignore the *value* parameter, and use the *data* parameter instead.
|
|
|
The content of this parameter should be a JSON encoded list of all individual values to be inserted.
|