Results 1 to 3 of 3
  1. #1
    sQu3aKy is offline Member
    Join Date
    Apr 2010
    Posts
    9
    Rep Power
    0

    Smile 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.

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    5

    Default

    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.

  3. #3
    pcman312 is offline Member
    Join Date
    Dec 2010
    Posts
    8
    Rep Power
    0

    Default

    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:

    • Performance
    • 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.

Similar Threads

  1. different instant variable of same class
    By javastuden in forum New To Java
    Replies: 1
    Last Post: 11-20-2009, 05:06 AM
  2. how to write a messenger with using java?
    By kira4 in forum New To Java
    Replies: 2
    Last Post: 07-30-2008, 08:15 PM
  3. Instant Messaging Program
    By Zosden in forum Networking
    Replies: 13
    Last Post: 05-05-2008, 07:18 AM
  4. 123 Web Messenger Server 1.2
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 08-10-2007, 04:32 PM
  5. messenger
    By Peter in forum Advanced Java
    Replies: 2
    Last Post: 07-04-2007, 07:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •