Sockets and streams

In distributed computing, network communication is one of the essential parts of any system, and the socket is the endpoint of every instance of network communication. In Java communication, it is the most critical and basic object involved. You may have seen browsers connect and communicate with the server through URLs over an HTTP protocol. Now, this is a high-level connection mechanism for accessing resources over the internet using URL and URLConnection. However, when huge amounts of data need to be exchanged in a secure way, then this method is not as performant as low-level data exchange. The reason is that every URL works on character streams, whereas low-level data exchange supports raw binary data exchange. Also, ...

Get Distributed Computing in Java 9 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.