Starting a server
Running the Chat demo
Using OpenMOM explorer
Servers List
Server Configuration

 

 


Copyright © 1999 4 Tier Software

 

 

 

 

 

 

 

OpenMOM allows the different components of a distributed application (called services) to communicate with each other through messages. These messages are managed by message brokers called OpenMOM servers.

 

Before using demos the first thing to do is to launch a server. You can do this by selecting the default server item created in your start menu at installation time. The program item is named OpenMOM Server.

Note that for a Windows NT 3.51 installation this item is found in the program manager (inside the newly created OpenMOM program group).

Click on the Properties button.

 

If TCP/IP is correctly configured on your computer, just press the Start button.

Protocol Sequence :
If you don't have any network capabilities installed on your computer choose Local as protocol.
You can select other protocols in the list. If you choose All available protocols they will be tried in sequence and the server will check all valid ones (note that this can take quiet a long time).

End Point :
Possible values depend on the protocol used. A string is a valid end point for the Local protocol which has also to be a valid port number for TCP/IP.
You don't have to fill this field. If you leave it void, a correct value will be attributed automatically.

Config File Name :
A file specifying further capabilities of the server.
See
Server Configuration.

Server Name :
This name is used to identify the server (in conjunction with the server role).

Server Role :
This value is used to identify the server (in conjunction with the server name).
Specify values greater or equal to 1.

 

Tips

In order to simplify administration tasks, some rules have to be respected.

 

OpenMOM Server Command line

%REROOT%\xiomom\bin\RE_ServerWin.exe -p protocol -c server config file -s server name -r server role -e endpoint -x server routes file

All parameters are optional.

 

protocol is one of the following :
TCP/IP ncacn_ip_tcp
UDP/IP ncadg_ip_udp
NetBIOS/IPX ncacn_nb_ipx
NetBIOS/NetBEUI ncacn_nb_nb
NetBIOS/TCP ncacn_nb_tcp
Named Pipes ncacn_np
SPX ncacn_spx
DECnet transport ncacn_dnet_nsp
IPX ncadg_ipx
Local communications ncalrpc

If a protocol is not specified, (Item All available protocols from the interface), they will be tried in sequence and the server will check all valid ones (note that it can take quiet a long time).

If server routes file is provided, corresponding routes are restablished (if possible) when the server starts.

A console executable is also available : %REROOT%\xiomom\bin\RE_Server.exe, it uses the same command line.

Remark :
If server config file and server routes file are in %REROOT%\xiomom\files (which is the default), you don't have to provide a full path (just the file name). This is useful because of the command line's length limitation. 

 

 

 

 

Connect the Chat client to an OpenMOM server

The only mandatory field in this screen is the User one. If no other field is filled, then the configuration file %REROOT%\xiomom\files\Servers.lst will be used to find an active OpenMOM server. (To modify this file see Servers List Editor).

If you want to connect to an OpenMOM server which is not referenced in your servers list, a set of parameters can be entered manually. Otherwise just press the OK button.

Server :
The name of the server you want to connect.
* acts as a wildcard.

Role :
The role of the server you want to connect.
0 or blank act as a wildcard.

User :
This value is not used to find a server, but is the name you choose to chat.

Protocol Sequence :
The protocol you want to use.
Leaving blank when Host is specified (not
*) means that all possible protocols will be tried (time consuming connection). If Host is * then leaving blank means that protocols used are those found in the Servers List entries.

Host :
It can be the name or the address of the computer on which the OpenMOM server is running. Possible values depend on the protocol used.
If the value * is entered, the Servers List is used and other values act as additional criteria within this list.

End Point :
The End Point of the server you want to connect to. Possible values depend on the protocol used.
If you leave this field void, a correct value will be used automatically.

 

The Chat interface

Send :
Sends the message.

Clear :
Clears the screen.

To User :
Enter a user name or select one in the users list.

Users :
Opens the users list.

Persistent :
Validate it to send a persistent message to a non connected user.

Callback :
Validate it if you are connected to a local server managing callbacks.

 

The source code of this demo (among others) can be found in %REROOT%\xiomom\examples\C\Samples.zip.
Prebuilt executables are available in %REROOT%\xiomom\bin.

 

 

 

 

 

 

Connect a set of OpenMOM servers

The way to connect the explorer is the same as with the demos except that multiple servers can be connected in one connection request. In fact you will be connected to every server matching the criteria you entered (using the Servers List configuration if * is used as Host value).
If you leave default values and press the OK button, each active and visible server referenced in your Servers List will be shown (using entries matching the name of the explorer service which is ADMIN).

Server :
The name of the server(s) you want to connect to.
* acts as a wildcard.

Role :
The role of the server(s) you want to connect to.
0 or blank act as a wildcard.

Host :
Can be the name or the address of the computer on which OpenMOM servers are running. Possible values depend on the protocol used.
If the value * is entered, the Servers List is used and other values act as additional criteria within this list.

Protocol Sequence :
The protocol you want to use.
Leaving blank when Host is specified (not
*) means that the possible protocols will be tried (quiet a long connection time). If Host is * then leaving blank means that protocols used are those found in the Servers List entries.

End Point :
The End Point of the server you want to connect to. Possible values depend on the protocol used.
If you leave this field void, a correct value will be used automatically.

The connection screen can be recalled at any time to check out new servers.
OpenMOM explorer doesn't maintain a permanent connection, what you see is a picture of the servers activity at a given time.

 

The OpenMOM explorer interface

Buttons description


. Connect ...
. Disconnect ...
. Refresh selected connection
. Create Server Router ...
. Create Service Router ...
. Create Event Router ...
. Open Routers File ...
. Save Routers File ...
. Delete selected Message/Message Seed
. Enable/Disable Status of selected Service/Server

 

Common items

OpenMOM Server

Represents an OpenMOM server. You can modify its status. When a server is disabled it does nothing else but route messages.

Service

Represents a connected service. You can modify its status. When a service is disabled no more messages are posted to it.

Administration Service

Administration services are special services with extended permission. The OpenMOM explorer registers itself as an administration service.

Mailbox

Each suitable service owns a mailbox that can be inspected. In these mailboxes you won't find any message seeds but only messages posted to the service concerned.
Each OpenMOM server provides a view of its whole mailbox, including persistent message seeds.

Message Seed

Represents a message seed. You can view and delete persistent message seeds from a server's mailbox.

Message

This is a posted message. You can delete messages from a service's mailbox.

Global Message Seed

Represents a global message seed. You can view and delete persistent message seeds from a server's mailbox.

Global Message

Represents a posted global message. You can delete messages from a service's mailbox.

 

Reflexes items

All reflexes can have their status modified.

 

Logging Service

This service is used to store persistent messages on disk.
Local Service

These are special reflexes that can be viewed as actual services. They consume message copies, they can process messages reaching the server, and return a reply to the sender. In such a case, the message processing is synchronous.
Registration Filter

When a service connects to a server, the corresponding reflexes are triggered. The service that is trying to connect can associate a message with its connect request. It is the reflex that interprets the data contained in this message (a password, for example). The value returned by the filter reflex will determined whether or not the processing will be continued (connection refused or accepted). A list of filters can be declared for each service. These filters will be run in a sequence, and the first that returns a zero will reject the connect request.
A such filter can also be used to monitor connections.
Message Filter

When a message arrives on a server, the reflexes associated with the message are triggered. The message can be modified in a reflex (to change its destination, content, and so forth). If the reflex is a filter, its result will decide whether or not the processing will continue. A list of message filters can be declared for each pair service-event. These filters will be run in a sequence, and the first that returns a zero will stop the message processing.
De-registration Filter

When a service disconnects from a server, these reflexes are triggered. A list of filters can be declared for each service. These filters will be run in a sequence.
Message Delivery Filter

These reflexes are triggered when a posted message is about to be delivered to a service, their execution decides whether or not the message will be delivered. A list of message delivery filters can be declared for each pair service-event. These filters will be run in a sequence, and the first that returns a zero will stop the message delivery processing.
Dead Letters Reflex

These reflexes are triggered when a message doesn't find any matching service.
 

 

 

 

 

 

A Servers List is a file that allows services to find OpenMOM servers and to establish connections with them.

When a service tries to connect using the Servers List it looks for an entry matching its definition (an entry in a Servers List is a pair [Service Name - Service User] where both can be wildcards).
Each entry may reference multiple server declarations that will be tried in sequence during connection. A server declaration specifies two sets of information : the computer the server is running on (a host, a protocol and an endpoint - see Starting a Server) and, optionally, the targeted server's properties (Server Name and Server Role).

There is only one active Servers List per computer and it is located at %REROOT%\xiomom\files\Servers.lst.

 

Editing Servers Lists

A graphical tool is supplied to edit such files (program item 'Servers List Editor' in the OpenMOM program group) :

Buttons description


. New Servers List
. Open Servers List ...
. Save Servers List


. New entry (depends on current selection)
. Edit selected entry
. Remove selected entry
. Move selected entry up
. Move selected entry down

Creation and edition

    Service Name
    The service's name for which the entry is created. It can be
    *.

    User Name
    The service's user for which the entry is created. It can be
    *.

    Network Address
    It can be the name or the address of the computer on which the targeted OpenMOM
    server runs. Possible values depend on the protocol used.
    This value is mandatory except for the Local protocol ( in this case it must be
    *).

    Protocol Sequence
    The protocol used to connect to Network Address. It is recommended to set this value because leaving 'All available protocols' can result in a quiet long connection time.

    End Point
    The server's end point you want to connect to. Possible values depend on the protocol used.
    If you leave
    * in this field, a correct value will be used automatically..

    Server Name
    The targeted server's name. It can be
    *.

    Server Role
    The targeted server's role. It can be
    *.

Servers are declared in diminishing priority which means the most restrictive sections have to be declared first.

 

Servers Lists can be edited manually :

An entry in this file must have this form :

! <Service Name> <User Name>
<Network Address> <Protocol> <Endpoint> <Server Name> <Server Role>
...

    Service Name
    The service's name for which the entry is created. It can be
    *.

    User Name
    The service's user for which the entry is created. It can be
    *.

    Network Address
    Can be the name or the address of the computer on which the targeted OpenMOM
    server runs. Possible values depend on the protocol used.
    This value is mandatory except for the Local protocol ( in this case it must be
    *).

    Protocol
    The protocol used to connect to Network Address. It is recommended to set this value because leaving
    * can result in a quiet long connection time. See the list of protocols for possible values.

    Endpoint
    The End Point of the server you want to connect to. Possible values depend on the protocol used.
    If you leave
    * in this field, a correct value will be used automatically.

    Server Name
    The targeted server's name. It can be
    *.

    Server Role
    The targeted server's role. It can be
    *.

If <Service Name>, <User Name> or <Server Name> contain empty spaces, replace them with + (it implies that the '+' character is not allowed in names)

Servers are declared in diminishing priority which means the most restrictive sections have to be declared first.

! Service1 Toto
...
! Service1 *
...
! * *
...

Example :

! ADMIN *
pc17 ncacn_nb_nb * * *
4tier12 ncacn_ip_tcp * * *
* ncalrpc * * *

! CHAT *
pc17 ncacn_nb_nb * Chat+Server *

! * *
4tier12 ncacn_ip_tcp * Server1 *
* ncalrpc * * *

 

 

 

 

OpenMOM servers are fully adaptable programs whose action can be modified dynamically, and whose execution can be monitored.

An OpenMOM server manages each client access on an independent thread, which can include event-triggered calls to external functions (provided in DLLs). This is called reflex triggering. Reflexes are of use when connecting services (for example for protecting access to a server with passwords, monitoring accesses, and so forth). But they can also be triggered when a message arrives (any message, or specific messages determined by selection criteria) running actions, acting on the message, allowing it or keeping it from being processed, routing it to another destination, converting it, having it processed by another communication program, etc.

Examples of useful reflexes

Access control, alert callbacks to clients when a message arrives, compression-decompression, activity surveillance, ciphering and deciphering, fined tuned load balancing, routing, among others.

Associating reflexes to a server

A specific configuration file declaring the available reflexes can be associated with each OpenMOM server (see Starting a Server).

 

Editing Server Configuration Files

Manually :
File syntax for server configuration

A graphical tool is supplied to edit such files (program item 'Server Configuration Editor' in the OpenMOM program group) :

Buttons description


. New File
. Open File ...
. Save File


. New Local Service
. New Message Filter
. New Logging Service
. New Registration Filter
. New Dead Letters Reflex


. Edit selected entry
. Remove selected entry
. Move selected entry up
. Move selected entry down

 

 

  Creation and edition of reflexes

Logging Service
Service Name The logging service's name
DLL Path RE_LogService.dll
Key The service's name for which to log messages
Value Log file's full name


All persistent messages destined for <Key> are stored in the file <Value>.
<Key> can be
*.
Multiple log files can be specified for <Key>, but one of them has to be the master; this is the last one declared for <Key>, others, prior to this one, must be declared using character
~ before <Value>.

Local Service
Service Name The local service's name
DLL Path DLL
Key Event Name
Value Function Name

Every message for service <Service Name>, whose event name is <Key>, will trigger the function <Value> present in <DLL Path>.

The reflex prototype must be:

void Function Name (
	RE_RTmessage* PMmessage,
	RE_RTmessage* PManswer  );

Message Filter
Service Name The target service's name
DLL Path DLL
Key Event Name
Value Function Name

Every message <Key> for service <Service Name> will be filtered by the function <Value> present in <DLL Path>.
<Key> can be
*, in which case all messages for <Service Name> will be filtered.
<Service Name> can be
*. In such case the filter acts on message seeds.

The reflex prototype must be:

short Function Name (
	RE_RTmessage* PMmessage );

If it returns 0, the message is not sent and reflexes processing stops.

Registration Filter
Service Name The registration filter's name
DLL Path DLL
Key Service Name
Value Function Name

These filters are triggered when a service <Service Name> connects to a server.
<Service Name> can be
*, in such case the filter is evaluated for each connection

The reflex prototype must be:

short Function Name ( 
	RE_RTservice* PMservice,
	RE_RTmessage* PMmessage);

If it returns 0, the service is not allowed to connect.

Message Delivery Filter
Service Name The target service's name
DLL Path DLL
Key Event Name
Value Function Name

Every message <Key> for service <Service Name> will be filtered by the function <Value> present in <DLL Path>.
<Key> can be
*, in which case all messages for <Service Name> will be filtered.
<Service Name> can be
*.

The reflex prototype must be:

short Function Name (
	RE_RTmessage* PMmessage );

If it returns 0, the message is not delivered and reflexes processing stops.

De-registration Filter
Service Name The de-registration filter's name
DLL Path DLL
Key Service Name
Value Function Name

These filters are triggered when a service <Service Name> disconnects from a server.
<Service Name> can be
*, in such case the filter is evaluated for each disconnection

The reflex prototype must be:

short Function Name ( 
	RE_RTservice* PMservice );

Must always return 1.

Dead Letters Reflex
Service Name The target service's name
DLL Path DLL
Key Event Name
Value Function Name

These reflexes are triggered when a message <Event Name> for <Service Name> doesn't find any matching service.
<Service Name> and <Event Name> can be *.

The reflex prototype must be:

void Function Name (
	RE_RTmessage* PMmessage,
	RE_RTmessage* PManswer  );

 

 

 

 

 

 

 

 

 

 


Copyright © 1999 4 Tier Software