Registering of Services and Clients

Services and client programs using a knowledge agent to communicate with the knowledge layer need to register with the local knowledge agent. Therefore they need to establish a connection with the agent on the localhost interface. The agent provides two operations limited to the localhost connections, hello and bye .

Hello-Operation

The hello -operation registers a client-program oder a service at the local agent. The message contains information about the type of client, security information etc. The following table presents the attributes with possible values and their meaning.
Property Value Range Description
type service|client This property selects the type of registering. If it is a service, it may store information in the knowledge store of the local agent and can receive information from the network.
id 32 chars The element has the attribute type, where its value may be fixed or dynamic. The element's content is the 32 byte id of the client-program or service. The type-attribute specifies, whether the id is fixed or dynamic. If the id is dynamic, it might change over the time or the same client can reconnect with different ids.
key-fingerprint string The fingerprint of the certificate.
integrated true|false Specifies whether the client is already integrated into the Authone network.
forward-requests true|false This attribute can be true for services, if they want to handle GET requests themselves and not via the knowledge store.

The response to the hello -operation is either an OK-Message or an error message.

Bye-Operation

If the client wants to shutdown its connection, it should send a bye message for a clean deregistering. This is especially important for services which handle requests themselves. The agent will detect an unexpected shutdown and present an error message, but a clean shutdown will inform other agents and thus services and programs about the expected shutdown and the unavailibility.
The process starts with the bye -message from the service/client. The knowledge agent will trigger a confirmation process. It will send the received bye -message back to the specified client (not through the channel it got it from but the stored registered channel) and waits for an ok -message. If anything else happens, the bye failed, but will still be answered with an ok -message.