• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to design chat application in RMI

 
Saibaskar Parthasarathy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Should multi threading be used in chat application? The chat application i've created does not use any thread.. The client periodically invokes few methods in the server and retrieves whatever messages it has recieved.. I've tested it with running over 5 clients in parallel, it did not give any problem.. Is that a proper design for chat? If u could kindly suggest me on this too
Thankyou
regards
saibaskar
 
asad ali
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should use multi threading for chat as RMI does not guarantee multithreading. Multithreading may be working in your environment, but it may not always work in other environments. Moreover, you should use RMI callback instead of clients connecting to server periodically to get new messages.
Check the RMI spec for multithreading http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmi-arch3.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic