1 Remote Components

It is possible to call SkunkWeb components on other servers, thanks to the remote and remote_client services.

When the remote service is loaded, the Configuration variable RemoteListenPorts is defined is sw.conf, and Configuration.job is scoped as REMOTE_JOB for the appropriate requests, the server's components are available for remote access over the specified port(s). (By default, sw.conf uses port 9887 and scopes Configuration.job accordingly.)

The remote_client service makes it possible to access remote components on other servers. When loaded, it installs an alternate component handler, which will be invoked if the component location argument to the component call is a ``swrc'' (SkunkWeb Remote Component) url, of the form:

swrc://hostname[:port]/path/to/component

Assuming that localhost is running the remote service on the default port (9887) and that the remote_client service is also loaded, the following two component calls should produce equivalent output:

<:datacomp /foo/bar/spam.comp a=`3` b=`4` cache=yes:>

<:datacomp "swrc://localhost/foo/bar/spam.comp" a=`3` b=`4` cache=yes:>

The remote component handler works with all components whose output is pickleable: regular components, data components, and includes.

These two services have no dependencies on one another in a given installation; a database server, for instance, might run a SkunkWeb instance dedicated to serving remote components to a number of SkunkWeb instances that themselves serve web pages and do not need to run the remote service.

The remote protocol is unencrypted and relatively transparent, although not designed for legibility; it is not suited for the transport of privileged data across the internet. A secure remote protocol is planned for a future release.