...
We will have layered approach for handling the client request message and server response message. Each layer will do its work and pass the message to next layer. Currently, we are planning to add this with Geode server, but eventually, it this architecture should work with Netty server/ other.
...
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 Message Handler interface and will be responsible for its task. Gliffy Diagram
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 |
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 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 (execute the apitheapi); if there is no error then call Request.ApiInvoker() for a synchronous request or call Request.AsyncApiInvoker for async Request |
Class Hierarchy
Gliffy Diagram | ||||
---|---|---|---|---|
|
Handler
Context
Message
Request
Response
Exception
SyncApiInvoker
AsyncApiInvoker
ResponseSender
Connection