Realtime Messaging API
AMI Backend Interface
Goal
The 3Forge Application Monitoring Interface (AMI) provides applications with a simple mechanism for connecting to the 3Forge Relay. 3Forge AMI's consolidated GUI lets users:
- View the application's health statistics
- Receive and manage objects though a simple workflow procedure
- Interact with applications to call routines inside the application
Conventions
- This document is written from the perspective of the application. "Outbound" is the application sending data, and "inbound" is the Application receiving data.
- All key words are in a "courier" font.
- Trailing text is indicated with an ellipses or "...".
- Special ASCII chars are qualified inside parenthesis.
- Brackets "[]" indicate optionally supplied data.
- Examples are in blue.
Overview
This interface is an extension of the 3Forge AMI product. Applications interact with AMI through the relays only, and not the central server nor the front end servers. Each AMI relay, upon startup, establishes a server socket on a well-known configurable port. As each application starts up, it should connect to the server socket of the relay running on its local host. Multiple applications can connect to one relay.
Applications then interact with the relay by sending and receiving "instructions." Instructions are well-defined, atomic, sequential and transactional messages. The first instruction an application sends after connecting must be a login (L) instruction. Following that, applications can send instructions arbitrarily and should listen for incoming instructions. Optionally, applications can send a logout (X) message to initiate a graceful shutdown.