What Asynchronous connection really means in inter-dependent JAVA application

Viewed 32

I am building an application which connect with other too. For the application I need to take a request from a websocket connection. Once i received the request need to send the request to some other application for processing and there will be few cases.

  1. If second application return accepted then wait for a response from 3rd application (3 will send response to 2nd and 2nd will initiate a push model).
  2. If second application return other than accepted then return false to the request

My confusion is, this way I will handle the request as synchronous or asynchronous ? As in case #1 I have to wait for some time to receive response from another application. more over in case #2 I can immediately process a request.

Sequence diagram for clarity of flow Sequence diagram for clarity of flow

0 Answers
Related