...
Multiple layers will process the Client request message. The following table contains the handlers for processing request, handler to execute the api, and handlers to send a response back to the client. Each handler will implement the Handler interface and will be responsible for its task. The column-1 represents(top-to-bottom) the inbound handlers to process the incoming request. The column-3(bottom-to-top) represents the outbound handler to send the response back to the client.
Request Message (Down) | Description | Response Message (up) | Description |
---|---|---|---|
MessageBytesCollector | Collect Message bytes
| MessageSender | Send the message to the client |
MetadataCollector |
| ||
MessageDecoder | Construct Message.
| ResponseEncoder | Serialize the response if there is no Exception We will have multiple encoders(thrift) |
DecorateKeyValue | Update key value based on metadata
| ResponseMetadataHandler | add any metadata in response |
DecorateKeyValue | Decorate key value based on metadata
| ||
ExceptionHandler | if Exception is set in context, then generate Exception Message | ||
AuthenticateHandler |
| ResponseAuthorizationHandler | authorize response
|
RequestAuthorizationHandler | 1. Request object will generate AuthContext 2. And Call then call authCallback 3. if fail then generate AuthFailed error | StatsHandler | Update the stats based on response or error code |
StatsHandler | Update the geode stats for request | ResponseHandler | Construct Response Message from request |
ApiExecutionHandler (executetheapiexecute the api); if there is no error then call Request.ApiInvoker() for a synchronous request or call Request.AsyncApiInvoker for async Request |
...
The exception class will implement the Message interface. This will ability to write error on a wire. The Exception class will have error code and message. That will be an error response to a api invocation.
SyncApiInvoker
This class will have the ability to execute the particular api.
...
This class holds the context to write the response asynchronously on a wire. The function execution framework will hold response sender to write partial back to a client. Similarly, the Geode queue framework will hold response sender to notify events to a client.
Connection
This class will hold the socket to read the request and write the response.
...