• Post Reply Bookmark Topic Watch Topic
  • New Topic

Design for Chat Server

 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please tell me the design for chat server with the technology(Message Driven Beans or jms also required).
Which will be good.
thanx in advance
Raj kumar
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35719
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raj,
Welcome to JavaRanch!

You are correct that it makes sense to use queues (asynchronous communication) for a chat server so as to not hold up processing.

Try coming up with a sample design and then people here can make comments. It's hard to just say that "this is the design for a program" as it depends on many things.
 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx a lot
At this time i have made one basic chatting through command prompt between sender and reciever.
#using JMS only
#using JMS+MDB

But
#for chat server , a server should decide which client to send that particular message like yahoo messenger but i am not able to implement that functionality
Because :
I have only 2 files:
1 for sender
1 for reciever
plz tell me how this can be implemented
#how client2 will know that this message has been sent to him from client1 so that name of client1 can be displayed in his window
#how client1 will get acknowledgement about delivery of message to client2.
Waiting for your reply
Thanx
 
Yuan Ye
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
#1, you can wrap the origin info into the MDB message. So when the message is delivered, the receiver can know the origianl sender.
#2, there is no guarantee that a message will be delivered if you use MDB. But if the receiver is not online, you can send a warning message back to the sender.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!