REST web services: synchronous or asynchrous?

I think this might be a good help for you to understand the RESTful web services in Java:

  • Building RESTful Web Services with JAX-RS


You can control the client being synchronous or asynchronous from the client side. An example - using AJAX.


@Thrustmaster has explained it well. I just wanted to add a point to make it sound simpler.

REST web service is nothing but an HTTP call. You make a HTTP request to a URL and get a HTTP response back. How to handle the request and response is up to the caller.


"Synchronous" or "Asynchronous" is the behaviour of the client that is requesting the resource. It has nothing to do with REST webservice, its structure, or the supporting server.

Synchronous behaviour:

  • Client constructs an HTTP structure, sends over the socket connection.
  • Waits for the response HTTP.

Asychronous behaviour:

  • Client constructs HTTP structure, sends the request, and moves on.
  • There's another thread that is waiting on the socket for the response. Once response arrives, the original sender is notified (usually, using a callback like structure).

REST services has not nothing to do with being Synchronous or asynchronous.

Client Side: Clients calling must support asynchronous to achieve it like AJAX in browser.

Server Side: Multi- Thread environment / Non blocking IO are used to achieve asynchronous service.