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.)