Andy
Andy

Reputation: 531

What is the difference between echo-server and client-server chat application in java?

Also I want to know what is main difference between Single Threaded and MultiThreaded Client-Server? I want to create a client server chat application.

Server Form consist: 1 Textarea(text area) (to display text) 1 sendarea(text area) (to type the text to send) 1 Send button (to send the text which is typed in sendarea) it sends to client 1 exit button (closes application)

Client Form consist: 1 Textarea(text area) (to display text) 1 sendarea(text area) (to type the text to send) 1 Send button (to send the text which is typed in sendarea) it sends to server 1 exit button (closes application)

Upvotes: 3

Views: 20206

Answers (2)

npinti
npinti

Reputation: 52185

This sounds a lot like home work so if it is you should mark it so.

An echo server is usually an application which is used to test if the connection between a client and a server is successful. It consists of a server which sends back whatever text the client sent.

A client-server is any environment in which you have a main node(server) to which other nodes (clients) connect to, usually to request some information.

Single Threaded servers are servers which use 1 main thread to handle all requests. Usually these are used to handle very short requests such as synchronizing computer clocks. These are known as Iterative Servers.

Multi Threaded servers are servers which use one ore more threads per client. This is usually the case with most application servers and is good for scalability. It also allows the servers to handle multiple clients at any one point in time. These are known as Concurrent Servers.

I would recommend you take a look at this Oracle Tutorial. It should get you started and point you in the right direction.

Upvotes: 1

Darren
Darren

Reputation: 70728

Single threads means 1 thread. Multi threading means multiple threads. What this means in term of your chat server is:

If you have a single threaded server only 1 connection can be made to the server. Multithreading will allow you to create a new thread each time a new chat client connects and issue its own Input/output stream to send and receive chat messages.

An echo server will just echo messages back from the 1 client connected where as a chat server will allow you to broadcast messages to other users and allow them to send messages to your client.

Upvotes: 2

Related Questions