File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Distributed Java and the fly likes how to design chat application in RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "how to design chat application in RMI" Watch "how to design chat application in RMI" New topic

how to design chat application in RMI

Saibaskar Parthasarathy

Joined: Dec 14, 2000
Posts: 5

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
asad ali

Joined: Dec 12, 2000
Posts: 20
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
I agree. Here's the link:
subject: how to design chat application in RMI
It's not a secret anymore!