DIV Research Notes

Issues

questions

Are pip sheets shared somehow ? while windows are referenced from a part in the SoContextKit , nothing else is !

pip sheets could be shared now in the Zajic implementation, otherwise they are excluded from distribution.

Remodeling DIV

The following additions should make it possible to put a lot of sman functionality closer to the actual div groups that are involved in it. The ACE DIV version simplifies the implementation as it already provides reliable communication where all hosts can be senders (masters). the rest can be implemented on top of that by extending the DIV protocol.

distribution of nodes to connecting slaves

DIV is to general to have the idea of a node being in different state. only deltas are communicated, but the scenegraph has to be the same before this works. There are some reasons for that :

I'm not sure whether we should change that simple design, because of its generality. however to achieve the distribution of the nodes to connecting slaves, we need some more information :

The same mechanism could then be used to share new nodes on the fly.

I propose the following design to achieve distribution of new nodes and nodes to connecting slaves :

switching master - slave

again this could be implemented ontop of the current div. an additional pair of messages is implemented: DIV_REQUEST_MASTER, DIV_TRANSFER_MASTER.

sman2

Every operation is more or less idempotent. most act both ways, that is they are send to the server as well as to hosts.

no checks are made on the validity or coherence of the data. only data necessary to perform a certain operation is checked and error messages are produced if something is wrong. in this case the operation is not performed and nothing is changed or send to the hosts. it is assumed that the hosts follow the correct protocol.

The following messages exist :

START_APPLICATION
SET_DIV_PARAM
STOP_APPLICATION
SET_APPLICATION_MODE
JOIN_LOCALE
LEAVE_LOCALE
ADD_USER
REMOVE_USER
USERKIT_PARAM

The following events are no commands per se, but as something meaningful should happen, it is treated like an event happening in the system.

Host connecting
Host disconnecting

application id name space

In the DIV 2.0 version all hosts were closely coupled and started all applications at the same time. In this setup it was enough to let one host establish a unique context id and share it with the others via streaming etc.

Locales break this assumption because hosts may start applications unknown from each other and integrate them at a later point into their view of the world. Again unique identifiers need to be established but know in a situation where concurrency issues can evolve.

The solution is to establish a name space for each host so that each host can construct unique application ids without colliding with other hosts. This could be done at two points :

  1. in the component managing the local application instances. This requires that a local component concerns itself with a problem that is not really in its domain.
  2. the distribution component at each host maps the local app ids to a name space structure that is shared by all hosts. the mapping works transparent to the local component and the distribution system.

I implemented the 2. solution because I think it adequately separates the different responsibilities to the appropriate components. This is implemented by prefixing the local id with the host ip address and local port number used to connect to the session manager. These form a unique name space for each process, therefore no conflicts can occur.

common actions

loading shared apps at startup

triggered at startup, involves the following messages :
STB_QUERY_APPS_FROM_SMAN
STB_STREAM_CONTEXT
STB_CONTEXT_STREAMED
STB_CONTEXT_STREAMED_WITH_DIV
STB_START_DIV_STREAMED

load a new application

load a new application, involves the following messages :
STB_LOAD_APPLICATION
STB_CREATE_SLAVE_CONTEXT
STB_SLAVE_CONTEXT_CREATED
STB_START_DIV

request master mode on a certain host

get master to host, involves the following messages :
STB_GET_MASTER_CONTEXT
STB_SET_SLAVE_CONTEXT
STB_SLAVE_CONTEXT_SET
STB_SET_MASTER_CONTEXT
STB_MASTER_CONTEXT_SET
STB_MIGRATE_SLAVE_CONTEXT
STB_SLAVE_CONTEXT_MIGRATED
STB_START_DIV_MIGRATED