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