Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2007

Tip: Looking for answers? Try searching our database.

RMI and Threading

Thread view: 
KDawg44 - 12 Oct 2007 17:10 GMT
Hi,

I have a task for a class i am in to write an instant messaging java
app that communicates with a server using RMI.  The client has to have
two threads running, one to send out messages (communicate with server
to get information about the other client to send to and then open a
socket to that client's address) and another to listen for messages (a
serversocket accepting incoming messages from other clients).

I have used threads before but usually to allow concurrent connections
on a server and for some reason this is really messing me up.

Any advice on how to get my mind around this would be appreciated....

I know this is kind of vague but I am not exactly sure what else to
put down...

Thanks for any direction....
Lionel van den Berg - 12 Oct 2007 23:11 GMT
> I know this is kind of vague but I am not exactly sure what else to
> put down...

You're right, it is vague. We don't even know what is messing you up.
Please elaborate on what you do not understand!
Daniel Pitts - 13 Oct 2007 17:52 GMT
> Hi,
>
[quoted text clipped - 14 lines]
>
> Thanks for any direction....

Generally, the RMI framework handles the threading and connections for
you.  On the other hand, RMI is particular poorly suited to any
situation where one or both sides are behind a firewall. You'd be better
off finding an alternate means of communication.  Either by designed a
custom protocol yourself, suited specifically to your Instant Messaging
domain, or by using one of the many technologies designed for this use.
 Also note that there are some libraries that handle I.M. with all the
major networks for you.  Libpurple comes to mind, but its not Java
based, so you'd have to either find a Java version, write a JNI wrapper,
or create your app in another language.

Signature

Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.