Practicality of URLs

When we communicate over sockets, we don't know what type of data format we are dealing with. This may be an issue in a client-server environment where clients are not aware of the kind of data server that would be broadcasted. In this case, either both the parties should be in agreement about the kind of data that will be used for communication, or we should establish our own way of communicating metadata along with primary data that will tell the data type of primary data.

Using Java's classes for HTTP support makes it possible to serve and access data objects with ease in regard to knowing their type and format. To make a document available on a URL, we can deploy the document on the web server along with the respective ...

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.