Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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)DescriptionResponse Message (up)Description
MessageBytesCollector

Collect Message bytes

  1. read message header, find payload size
  2. read payload
  3. pass byte buffer to next handler
MessageSenderSend the message to the client
MetadataCollector
  1. Extract metadata from byte buffer
  2. Setmetdatain Set metadata in context
  3. pass byte buffer to next handler
  
MessageDecoder

Construct Message.

  1. Look apiId and decode message
  2. create Request, ApiInvoker
  3. And pass to next handler
  4. We will have multiple decoder(thrift)
ResponseEncoder

Serialize the response if there is no Exception

We will have multiple encoderencoders(thrift)

DecorateKeyValue

Update key value based on metadata

  1. if metadata indicates it is JSON string then
    convert that string to pdx
  2. pass to next handler

 

ResponseMetadataHandleradd any metadata in response
  DecorateKeyValue

Decorate key value based on metadata

  1. if metadata indicates it is expecting JSON string then
    convert pdx to JSON
  2. pass to next handler
  ExceptionHandlerif Exception is set in context, then generate Exception Message
AuthenticateHandler
  1. verify whether connection is authenticated or not
  2. if fail then generate AuthRequired error
ResponseAuthorizationHandler

authorize response

  1. if fail then set generateAuthFailedexceptiongenerateAuthFailedException

 

RequestAuthorizationHandler

1. Request object will generate AuthContext

2. And Call then call authCallback

3. if fail then generate AuthFailed error

StatsHandlerUpdate the stats based on response or error code
StatsHandlerUpdate the geode stats for requestResponseHandlerConstruct 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

...