Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please dont copy and past from web. if you have drop box please post it in drop

ID: 3553194 • Letter: P

Question

please dont copy and past from web.

if you have drop box please post it in drop box and share the link thanks





Write short answers Give any TWO solutions for a server trying to handle a thousand or more number of simultaneous connections: 1. 2. What are the TWO ways of creating threads: 1. 2. What is a thread pool? Give an example where it would be efficient in a network program? Illustrate with examples the use of: URL class and InetAddress objects. Explain how you can communicate with server side programs? What is a socket? What are the basic operations it can perform? List any four socket properties accessible through getter methods: 1. 2. 3. 4. Explain how you choose cipher suites in Java?

Explanation / Answer

1. Solutions for a server handling many connections are as follows:

2. The two ways of creating threads are:

3. Thread pool is a collection of idle threads that stay ready to be given a process. These are preferred in cases where large number of short tasks are necessary. The thread pool is primarily used to reduce the number of application threads and provide management of the worker threads.

If the threads are'nt blocked to do disk or network I/O then the most efficient number of threads in the pool is one per-processor (assuming all the work is being done on the thread pool threads).


4.


The inetAddress objects represents an IP address. It is used by other classes like Socket to identify hosts.

Example:

public static InetAddress getByName(String host) throws UnknownHostException

http://java.sun.com/


5.

The most efficient way to communicate with server side program would be to use a socket.


6.

Sockets is a device for communication between a client program and a server program in a network.

Some of the operations of socket are:ConstructingBindingListeningAccepting


7.