The ANNOUNCE message is the core message in SLAP. Sent as a UDP broadcast, it announces information about a service to the network. It's purpose is to inform interested clients about the current state of the service.
ANNOUNCE [service name] [state (Green|Amber|Red|Blue)] [service uri] <[optional attributes (name=value)]>
|service name||A name for the service, well known within the system domain|
|state||The current state of the service as represented by one of 4 values Green, Amber, Red or Blue, see below|
|service uri||Unique network address for the service. Can be any format that the client would recognise.|
|optional attributes||An optional series of attribute value pairs seperated with a new line.|
Service states are used in SLAP to give a simple indication as to the service state.
|Green||Service is fully operational and available|
|Amber||Service is operational but under load|
|Red||Service is not operational|
|Blue||Service state is unknown|
If more information is required, then the service would include this with the optional attirbutes of the message. The content of these atttributes is not defined and is open to individual system implementations.
For example, information on current service performance (transations per second, queue size, memory utilisation, etc) could be included to allow the client to make utilisation decisions.
A typical ANNOUNCE message would look like this.
ANNOUNCE SMSCProxy Green node1.company.com:1234 Route=Operator1 Binds=3
Generally these messages would be broadcast at regular intervals to keep clients updated with service information. There are times when a client needs to actively interrogate the state of a service, for instance on startup, for which the LOCATE message is defined. More of that in the next post on SLAP.