For Software Developers

As a developer, depending on your application, you have a few choices on how you want your modules to be called within Velokri Platform. If your modules can be independently run then you define action scripts that may call the executables themselves.

If your modules cannot be run with a "main()" you can build shared object libraries that interface your application with our calling interface. When a request for a function call arrives, our software loads your shared object library and calls the relevant function within the OPS process itself. The number of simultaneous executions can be set for each OPS in a properties file. Of course, ideally simultaneous executions should match the number of CPUs on the given node.

Developers can write custom scripts, known as action scripts, that contain sets of functions/executables to be called with their arguments. They may also include the use of DBS statements either separately or combined with complex dependencies. Following is an example of the action script in its raw form:

(sql (statement "INSERT into PROCS values ($, '$')")
             (execute (command "date" "+%s" )))
      (input "parallel" (post-process 
                                     "string_concatenate" "string_chomp")
             (execute (command "/opt/bin/commandA" 0 17 "third arg"))
             (execute (command "/opt/bin/commandA" 18 36 "third arg"))
             (execute (command "/opt/bin/commandB"))))

In the above example action script an "SQL INSERT" statement uses values acquired from executing three commands in parallel in addition to a single command for the first column's value. The first command run, "/opt/bin/commandA" takes three arguments 0, 17 and "third arg" and so on. Upon successful return the output values are concatenated using our library functions "string_concatenate" and "string_chomp". This value is now ready to be entered into the second column of PROCS table. The first column is also updated with the time in seconds since Jan 1 1970. If the grid is composed of a single database server that operates with PERSIST, REMOVE and QUERY operations then the insert statement shall go to the lone server after the commands have been executed. The dependency tree is built into the structure of the script itself therefore if command executions fail the SQL INSERT operation is abandoned. Action scripts themselves can readily be converted to XML format for presentation purposes.

If you would like to have a read-only database or table distributed across many nodes that your application could use for fast access, you can simply tune a few parameters in configuration files to achieve that effect.