Application and practice of Distributed Java (i.)

Source: Internet
Author: User

A) distributed Java Applications

1.1 Communication between systems based on message mode

Data transmission

TCP/IP Reliable Network transport protocol, first to the communication between the two parties to establish a link before the data transmission, to ensure reliable link and data transmission, so will sacrifice some performance

UDP/IP does not guarantee that the data must arrive at the network transport protocol, not directly to the two sides of the communication to establish a link but send to the network for delivery. Performance is good but there is data chaos or loss.

Data processing

Synchronous IO:

BIO (Blocking IO)-When a read or write operation is initiated, it is blocked, and the resource is freed only when the program reads the stream or writes the stream to the operating system

NIO (non-blocking IO)-event-driven thinking, implemented using reactor mode. When a read or write operation is initiated as a non-blocking method, the operating system notifies the application to process when the socket has a stream-readable or writable socket, and the application then reads the stream into the buffer or writes to the operating system.

Asynchronous Io:aio-based on the idea of event-driven, implemented by Proactor mode. When reading and writing, just call the API's read or write method directly, both of which are asynchronous. When a stream is readable, the operating system streams the readable buffer into the Read method and notifies the application. When the operating system writes the stream that is passed by the Write method, the operating system proactively notifies the application.

About bio, NIO, AIO, reference http://ihenu.iteye.com/blog/2247618

Tcp/ip+bio, Tcp/ip+bio, Tcp/ip+nio, Udp/ip+bio, Udp/ip+nio, inter-system communication based on Java self-package implementation

2. Realization of communication between systems based on remote call method

A remote Java implementation can be invoked transparently by invoking a local Java-based excuse. There are mainly RMI and webservice.

Application and practice of Distributed Java (i.)

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.