Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Question about RMI and Non-network mode

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all:

In the assignment requirement:


The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.
The operating mode is selected using the single command line argument that is permitted. Architecturally, this mode must use the database and GUI from the networked form, but must not use the network server code at all.



I have finish the network mode part using RMI, here is my system architecture

Data
|
BusinessModel(extends UnicastRemoteObject implements Remote)
|
| (communication over network)
|
client code

I am now implement the non-network mode, but if I try to create a new
instance of BusinessModel without create BusinessModel_Stub and BusinessModel_Skel, a big-fat StubNotFoundException will be thrown.
If my system running in non-network mode but must rely on the existence
of BusinessModel_Stub, am I violate the requirement?
(In non-network, I'm not using any code about binding port or using rmiregstry)


Thanks a lot for answering and happy weekend,
Ching-Tien Chang
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a good reason to think out your architecture first.

What about this instead? This isn't quite right, but it might get you thinking...

Data
|
Business Functions
______________|____________
/ \
BusinessModel Non-NetworkedModel
| |
Network Direct Interface
\_________________________/
|
client code

ARG: I can't display this on this bulletin board. Lemme try now:

[ July 23, 2004: Message edited by: Robert Konigsberg ]
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I really did not understand what Robert Konigsberg means, but isn't it the case where you could do:

interface DataBase extends Remote
class LocalDataBase implements DataBase
and have a local Data base and when you whant a remote database, you do:

Remote sever = new LocalDataBase()
UnicastRemoteObject.exportObject(server, 0)

???
Itapaj� takeguma
SCJP 1.4 (91%)
 
Ching-Tien Chang
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for Robert Konigsberg and Itapaj� Takeguma's reply and sorry for reply so lately.

I will think about both of your suggestions and post new question here if I still have any question about this.

Sincerely,
Chhing-Tien Chang
 
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic