Results 1 to 3 of 3
Thread: Instant Messenger using RMI
- 12-15-2010, 01:48 AM #1Member
- Join Date
- Apr 2010
- Rep Power
Instant Messenger using RMI
Hi to all,
I am trying to build instant messenger using RMI (Remote Method Invocation) and am not sure on were to start would appriciate if someone could give me a start as I am not familiar with RMI.
Pls note that this is not for school stuff it's just for expanding my knowledge on java.
P.S. Thinking of using Netbeans to build the IM.
Thanks to all those taking their time viewing or replying.
- 12-15-2010, 02:46 AM #2
RMI requires a registry service on a (UDP or TCP?) port. so its probably better to have the clients connect to the server and have the client invoke a method in the server, that blocks until a message is available. because server originated messages to the client would be difficult without the client also having an RMI registry. Also I think the connections are brought up and released as required for the method invocation, might not be persistent connection like Jabber IM would use over TCP.
I'm not sure using UDP would be the best transport for an instant messenger, but it would be amusing to see if it is possible to build id.
- 12-30-2010, 01:33 AM #3Member
- Join Date
- Dec 2010
- Rep Power
I have been (slowly) working on a RMI based chat application myself. If you aren't familiar with RMI, I suggest reading some of the tutorials out there to start: Trail: RMI (The Java™ Tutorials) Once you have this primer in RMI, then you can start thinking about some more complicated details like how one user is going to send a message to another user. For instance, do you want the server to act as an intermediary where the user sends the server the message, then the server forwards it on to the receiving user, thereby eliminating the direct connection between users. Or do you want to take a direct approach by having the server connect the users together directly rather than having the messages sent through the server. You'll also have to take other things into consideration:
- Saving user data
- Encryption of user data
- Encryption of messages (not a requirement, but something I've been toying with)
- Multi-threading the server
- Transmitting more complicated messages that might include emoticons or images
- Transferring files between users
- etc. etc.
I've gotten my IM to send messages between users, but I haven't built a GUI for the client yet. I'm solidifying pieces of the server now, including things like the configuration and the GUI interface I have for it.
- By javastuden in forum New To JavaReplies: 1Last Post: 11-20-2009, 06:06 AM
- By kira4 in forum New To JavaReplies: 2Last Post: 07-30-2008, 08:15 PM
- By Zosden in forum NetworkingReplies: 13Last Post: 05-05-2008, 07:18 AM
- By JavaBean in forum Java SoftwareReplies: 0Last Post: 08-10-2007, 04:32 PM
- By Peter in forum Advanced JavaReplies: 2Last Post: 07-04-2007, 07:33 AM