1.

How well do you know Socket Programming? List the benefits and drawbacks of Sockets in Java.

Answer»

Socket programming is a method for allowing two network nodes to communicate with one ANOTHER. One socket (node) monitors traffic on a specific port at a GIVEN IP address, while the other socket connects to it. The server creates the listener socket while the client is connected to it.

The following are some of the benefits of Java Sockets:

  • Sockets are adaptable and plentiful. For routine communications, socket-based programming is simple to build.
  • Low network traffic is caused by sockets. Unlike HTML forms and CGI scripts, which build and DELIVER complete web pages for each new request, Java applets can merely send the updated data.

The following are some of the drawbacks of Java Sockets:

  • Because a Java applet RUNNING in a Web browser can only connect to the machine from which it originated and nowhere else on the network, security constraints can be a pain at times.
  • Despite all of Java's advantages, socket-based connections are confined to the transfer of raw data packets between programs. Both the client and the server must provide techniques for converting data into usable information.
  • Socket-based systems are limited in their reusability since data formats and protocols are application-specific.


Discussion

No Comment Found