What are the similarities and differences between synchronous and asynchronous in Java?

Source: Internet
Author: User
  1. Synchronous interaction: Refers to sending a request, need to wait to return, and then be able to send the next request, there is a wait process;

  2. Asynchronous interaction: Refers to sending a request, without waiting for a return, at any time to send the next request, that is, no wait. Difference: one needs to wait, one does not need to wait, and in some cases, our project development will prioritize the asynchronous interaction that does not need to wait.

  3. What are the recommended scenarios for using synchronous interaction? For example, the bank's transfer system, the preservation of the database operations, and so on, will use synchronous interaction, the rest of the situation is preferred to use asynchronous interaction.

What are the similarities and differences between synchronous and asynchronous in Java?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.