
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).
|
If TCP/IP is correctly configured on your computer, just press the Start button.
|
Server Name : Server Role : |
Tips
In order to simplify administration tasks, some rules have to be respected.
- Create a shortcut for each server you plan to use, giving it a name.
- Associate it with a configuration file which has the same name as your server.
- If the server manages log files, choose file names related to the server name (log files are declared in the server's configuration file).
- Since OpenMOM servers'actions are entirely configurable, it is important to distinguish them clearly from one another. Aside from the server name, there a Role property also exists which makes the server easier to identify. This property is an integer value that can be given any meaning you wish. You may decide, for example, that all your Role 1 servers are "main" servers, Role 2 servers are backup servers, and so forth.
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.
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.
|
The Chat interface
|
Send : Clear : To User : Users : Persistent : Callback : |
| 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).
|
Host : Protocol Sequence : End Point : |
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
|
Common items
|
Represents an OpenMOM server. You can modify its status. When a server is disabled it does nothing else but route messages.
Represents a connected service. You can modify its status. When a service is disabled no more messages are posted to it.
Administration services are special services with extended permission. The OpenMOM explorer registers itself as an administration service.
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. |
Represents a message seed. You can view and delete persistent message seeds from a server's mailbox.
This is a posted message. You can delete messages from a service's mailbox.
Represents a global message seed. You can view and delete persistent message seeds from a server's mailbox.
Represents a posted global message. You can delete messages from a service's mailbox. |
Reflexes items
All reflexes can have their status modified.
This service is used to store persistent messages on disk. |
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. |
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. |
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. |
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. |
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. |
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
Creation and edition Service Name User Name Network Address Protocol Sequence End Point Server Name Server Role |
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> Service Name User Name Network Address Protocol Endpoint Server Name Server Role 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.
Example :
|
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) :
|
Creation and edition of reflexes
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>. |
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 ); |
||||||||||||||||
|
|
Every message <Key> for service <Service Name> will be filtered
by the function <Value> present in <DLL Path>. The reflex prototype must be: short Function Name ( RE_RTmessage* PMmessage ); If it returns 0, the message is not sent and reflexes processing stops. |
||||||||||||||||
|
These filters are triggered when a service <Service Name> connects to a server. 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. |
Every message <Key> for service <Service Name> will be filtered
by the function <Value> present in <DLL Path>. The reflex prototype must be: short Function Name ( RE_RTmessage* PMmessage ); If it returns 0, the message is not delivered and reflexes processing stops. |
||||||||||||||||
|
These filters are triggered when a service <Service Name> disconnects from a server. The reflex prototype must be: short Function Name ( RE_RTservice* PMservice ); Must always return 1. |
These reflexes are triggered when a message <Event
Name> for <Service Name> doesn't find any matching service. The reflex prototype must be: void Function Name ( RE_RTmessage* PMmessage, RE_RTmessage* PManswer ); |
Copyright © 1999 4 Tier Software