The /etc/webproctab file (in short, webproctab) describes webAppOS web processors that can be used by server-side code.
Currently, webAppOS specification does not define custom client-side web processors; it is assumed that there is always exactly one client-side web processor associated with the browser message loop. In the future, webAppOS specification can be extended to support custom client-side web processors, thus, the client-side webproctab may be introduced.
Further documentation is for the server-side webproctab.
Normally, webproctab describes one or more instances of local web processors, which are launched automatically. However, webproctab can also list remote web processors, which are not launched, but webAppOS connects to them.
Local and remote web processors are accessed via Server-Side Web Processor Adapters. For instance, the "localjava" adapter is able to launch local server-side web processors represented as Java classes.
The webproctab file format resembles UNIX fstab file format. Comment lines start with the dash (#) symbol. Each non-comment line represents one type of web processor and its options, including how many instances of web processors of the given type to launch (to connect to). The following fields must be specified in each line:
the server-side web processor adapter name used to access the given type of web processor (see Server-Side Web Processor Adapters);
the adapter-specific web processor address; for the "localjava" it is the Java class name; for remote web processors it can be an IP address; if the location contains spaces, it must be decorated by quotes;
web-processor specific options, which will be passed to each instance of web processor of the given type; multiple options must be delimited by colons (","); specify "none", if there are no options to pass;
the number of instances to launch (to connec to);
the name of the current web processor type (if multiple instances are running, the instance index will be appended; indexes start from 0); if the name contains spaces, it must be decorated by quotes;
the reconnect time in milliseconds - a time to wait before re-launching/re-connecting to a web processor instance, if it becomes inaccessible.
Launching 2 default web processors, forcing them to preload the "lua" web calls adapter. If either of the web processors dies, it will be automatically re-launched in 1000 ms (1 second).
# [proc-type=adapter-name] [adapter-specific address/location] [options or none] [instances/cores] [name] [reconnect ms]
# use TAB or space as delimiter
localjava org.webappos.webproc.DefaultWebProcessor load=lua 2 "Default server-side web processor" 1000
The default web processor lazy loads web calls adapters found in the org.webappos.adapters.webproc.[name] packages. To force loading a particular web calls adapter when the default web processor starts, the "load=[name]" option can be used.