Distributed View Server

In most cases, Server applications are distributed applications involving a dynamic view server and several application components. Also, Server is usually combined with a communication layer.

In Server applications, components can be implemented in C++ or JavaTM. The communication layer should provide interoperability between these two languages. Communication between the dynamic view server and its components relies on a simple message-based protocol that can be implemented on various communication layers.

Server provides its own communication layer, named MvTCP and based on TCP/IP sockets available on all platforms, both in C++ and JavaTM.

Naming a Distributed Server

A distributed dynamic view server must be associated with a name. This name will be used by remote components to connect to that server. This name is implicitly registered by Server at the level of the communication layer.

There are two ways of giving a server a name.

  • An easy way is to pass that name as an argument to the command line, like this:

myserver -ilsn myServerName ...

  • Another way consists in calling the static function SetName in your executable before initializing the process itself. For instance:

#include <ilserver/mvtcp/tcpmvproc.h>

#include <ilserver/mvserver.h>

int main(int argc, char **argv)

{

IlsMvProcess::SetName("myServerName");

if (!IlsTcpMvProcess::Initialize(argc,argv)

|| !IlsMvServer::Initialize(argc,argv))

...

}