This section discusses some of the general issues in compiling and linking with the SSM libraries. Still, the best way to learn about writing and compiling a VAS and client is to read the tutorial, Writing Value-Added Servers with the Shore Storage Manager.
All of the include files needed to build servers and clients are located in SHROOT/include. Any server code using the SSM should include sm_vas.h. Since clients do not need all of the SSM functionality, they need only include sm_app.h. The RPC package include files are located in SHROOT/include/rpc and are usually included with this line:
#include <rpc/rpc.h>
All of the libraries needed to build servers and clients are located in SHROOT/lib. Clients only need libshorecommon.a. Servers need both libsm.a and libshorecommon.a The RPC package library is librpclib.a.
There are two pre-compiled version of these libraries. The are included in the debugging and no-debugging binary releases. The debugging version not only includes symbol table information ( -g option to gcc), but also has considerable additional auditing and assert checking code. This includes code that audits data pages whenever an update is made, performs monitoring to detect thread stack overflow, and checks over 1,400 additional assertions. See the Shore Release document for more information on these releases.
Note: when compiling for linkage with the debugging release, the compiler flag -DDEBUG should be used.
The SSM uses a number of templates One of the issues that is often confusing is controlling template instantiation. All of the template instantiations needed by the SSM are already included in the libraries.
However, due to a bug in gcc 2.6.* (supposedly to be fixed in 2.7.0), it is possible to have problems during linking due to multiple definitions of template code. To avoid this, and to have smaller executables, we use the gcc option -fno-implicit-templates in the Makefile from the tutorial example. This causes gcc not to emit any template code unless the template is explicitly instantiated.
Here is an example of explicit instantiation from the tutorial
#ifdef __GNUG__ // Explicitly instantiate lists of client_t. template class w_list_t<client_t>; #endif
The SSM has been used to build a number of value-added servers. Some of these are publicly available. You may find these helpful in writing your own.
The Shore Server is the server for the Shore object repository. The Shore Server actually has two interfaces. One is used by SDL applications and the other is the NFS interface. The Shore Server code is available in src/vas.
The SSM testing shell is a server with a TCL interface designed to test the SSM. The code is available in src/sm/ssh. No documentation is available yet.
Paradise is a GIS system still under development. It will be publicly available in the future. See http://www.cs.wisc.edu/paradise/ for more information.