+

Search Tips   |   Advanced Search

Server mode

The Server mode, available in a select number of Connectors, is designed to provide the functionality of waiting for an incoming event, dispatch a thread dealing with the event, and send a reply back to the originator.

Currently, all Server Mode connectors are connection-based. As a result, any AssemblyLine (AL) that uses a Server Mode Connector in its Feeds section will initialize and then wait for an incoming connection (by means of a TCP, HTTP, LDAP, Web Services, SNMP connection); when a connection is initiated, the Server Mode connector clones the AL it is part of, and resumes waiting for the next event (that is, a new connection initiation). In the cloned worker AL, meanwhile, the Server Mode Connector places itself in Iterator mode, and starts reading data from the connection. The data obtained from the connection is then fed to the rest of the AL in normal Iterator fashion, including following the standard Iterator Hook flow, reading the event entries one at a time and passing them to the other Flow components for processing until there is no more data to read. At the end of each cycle (often there will only be one) the AL headed by the Server Mode connector sends a reply back to the client—unless you decide to skip the reply phase with, for example, system.skipEntry();.

Once the AL it feeds is complete (that is, the data source is exhausted) that thread terminates; at this time, the worker AL is cleared away, and if necessary, the Pool Manager is informed that this AL instance is available again.

The original Server Mode connector, meanwhile, is still actively listening for more connection initiations.

Note that under certain rare conditions, such as when you issue more than 5 client requests to the server in parallel system, SNMP clients exit, giving bad Protocol Data Unit (PDU) exceptions. However, in a more realistic real-life situation an agent like the SNMP Server Connector is rarely queried intensely by multiple managers, like the SNMP Connector. The SNMP Connector has an undocumented configuration parameter named snmpWalkTimeout. We can override the default for this parameter, which is 5000 ms. The parameter is not accessible using the Config Editor. We can set the override value for this parameter using JavaScript. Set the value you want for the snmpWalkTimeout parameter in the following format:


Parent topic:

Connector modes