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 / June 2005

Tip: Looking for answers? Try searching our database.

RMI design help

Thread view: 
Sn0tters@yahoo.co.uk - 07 Jun 2005 23:13 GMT
Hi,

I am looking for some design help.

I am thinking of developing an app that will use a UI on a separate
thread.

I want the UI to just be event driven and not to do any real
processing.

Now the thing is I want the UI to, obviously, respond to the user and
send requests to the server, but I also want the server to be able to
send request to the UI to ask the user for information.

Is it valid to create a two way RMI interface or do I need to create
two separate  instances of interfaces, or more importantly, is RMI the
best way to do this?

Thanks for any advice
Wil
iksrazal@terra.com.br - 08 Jun 2005 12:20 GMT
RMI has good performance but requires port 1099, ie, firewall problems.
On a local subnet, should be fine. You could use web services which run
on port 80/8080, but, will require accepting a slight performance hit
due to that http is slower.

Look at the Observer and Proxy patterns to see if that answers your
other questions.

HTH,
iksrazal
http://www.braziloutsource.com/
Steve W. Jackson - 08 Jun 2005 19:25 GMT
> RMI has good performance but requires port 1099, ie, firewall problems.
> On a local subnet, should be fine. You could use web services which run
[quoted text clipped - 7 lines]
> iksrazal
> http://www.braziloutsource.com/

RMI defaults to port 1099, but it does not require it.  We've got a
recently developed app using JNDI with the actual service provider under
it being RMI, and we deliberately chose a port other than 1099 since
other parts of one application in the communications mix *may* be using
RMI on the default port for other purposes.

= Steve =
Signature

Steve W. Jackson
Montgomery, Alabama

Nigel Wade - 08 Jun 2005 15:17 GMT
> Hi,
>
> I am looking for some design help.
>
> I am thinking of developing an app that will use a UI on a separate
> thread.

The UI should run on the Event Dispatch Thread.

> I want the UI to just be event driven and not to do any real
> processing.

That makes sense, it's the way it's meant to be done.

> Now the thing is I want the UI to, obviously, respond to the user and
> send requests to the server, but I also want the server to be able to
> send request to the UI to ask the user for information.

That means you will need to introduce other threads. For the UI to send
requests to the server it should really run a processing thread to do this.
For the UI to be able to receive requests from the server it will have to
have a thread running a RMI server which is registered with the
rmiregistry.

> Is it valid to create a two way RMI interface or do I need to create
> two separate  instances of interfaces, or more importantly, is RMI the
> best way to do this?

I think you ought to have two interfaces. An RMI server implements an
interface and therefore your server and UI would both have to implement
each method of the two-way interface. This would be confusing for you, the
rmiregistry, the UI and server.

As to whether RMI is the best way to implement this, that's something you'll
have to determine yourself when you weigh-up other alternatives.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555



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.