The Subject Servers

A Publish-and-Subscribe bus

The Subject Servers is a publish-and-subscribe (or pub/sub) middleware system that allows users to multicast data. The Subject Servers provide users with the ability to communicate with each other based solely on the type of data involved. Users can publish data to generic subjects (such as "/Data") or specific subjects (such as "/Data/JamesReserve").

The design of the Subject Server system is detailed in its design document.

Usage

The Subject Servers act as routers. In order to instantiate a bus and send data, follow these instructions:
  1. Checkout the infra repository from the CENS CVS server. For instructions on this procedure, please see the CVS web page.
  2. Follow the build instructions located in the repository's README file (located in the root).
  3. Launch the Subject Server binary (sbjsrv) from the infra/bin/ directory. The usage for this binary can be viewed by running it without parameters. Subject Servers can be peered with one another, or can run in standalone mode.
You are now ready to connect clients to your Subject Server bus. To test it's operation, you can run one of the test drivers in infra/bin/. A simple client invocation might follow the following template:
infra/bin/TEST_ss_agnt_DRIVER -p <a local port that this client can listen on>
                              -S <the IP of the machine that your Subject Server is running on>
                              -P <the port your subject server is listening on>
                              -l 1

A simple test execution might involve 2 shells, and look like:

Shell 1

$ cd ${DEV_HOME}/bin/
$ ./sbjsrv -p 1133

Shell 2

$ cd ${DEV_HOME}/bin/
$ ./TEST_ss_agnt_DRIVER -p 2345 -S 127.0.0.1 -P 1133 -l 1

Building Your Own Subject Server Client

The Subject servers are built in C++. They can be built using shared or static libraries (via a variable in the make system), and they are currently supported on Linux and Solaris.

In order to build a client for the subject servers, you need to be able to include files found in:

infra/include/utils
infra/include/ccutils
infra/include/cens_net
In addition, you will need to link libraries:
infra/lib/libccutils.a
infra/lib/libcens_net.a

Questions regarding this system can be sent to the mailing list Cens-Systems