Clone wiki

vjdaemon / Request_processing

Request processing cycle

JSON processing

  1. Client sends serialized request to server through socket.
  2. SocketListenerPool gets MessageHandler from pool and runs it in a separate thread and returns to listening port
  3. MessageHandler receives data from socket and passes it to Protocol
  4. Protocol pefrorm parsing (or deserialization) of request, prepares Request and Response objects
    1. Protocol creates appropriate Command instance and passes Request and Response object to it
  5. Command executes action based on parameters in request. In case of execution errors command populates request with appropriate status and message
  6. Protocol serializes response processed by command
  7. MessageHandler sends serialized response back to client.