wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX: Non-Networked mode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX: Non-Networked mode" Watch "NX: Non-Networked mode" New topic
Author

NX: Non-Networked mode

Roy Augustine
Ranch Hand

Joined: Jul 08, 2003
Posts: 30
Hi all
I have a problem in understanding Non-Networked Mode part of my assignment. My assignment says

Non-networked mode
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 thought by database they mean all the data base management part including classes like Data, DataCache, and DataAdapter. And network server code in their second paragraph means all the classes used for accessing the database while in network mode including classes like Server. So I developed my project in a way so that, both networked and non networked mode using the same GUI and database part( database part I just described above) and in non-network mode it will not use the network server part.
But now after reading different postings I have a feeling that, by database they mean just the data file and DataCache and server means Data class that implements the DB interface. and also network server code means server used by network clients. So now I feel like there must be two servers one network server and another non network server both implements the Data class and in non networked mode application uses the non-networked server and must not use the network connection part.
So what you guys think, whether I need to rewrite my code so that I have two server part or my first approach was right?
Ken Krebs
Ranch Hand

Joined: Nov 27, 2002
Posts: 451
Roy,
I couldn't answer your question with any degree of certainty without knowing specifically what each of your classes are actually doing.
You might want to think about the problem something like this:
The database server has nothing do with any networking. It's only responsibility is to provide the capability to fetch/manipulate data in the database.
The networking server is an adaptor for the database server that provides the networking capability and simply delegates the real database work to the database server.
It's a good design practice to separate such disparate responsibilities into separate classes.
[ January 01, 2004: Message edited by: Ken Krebs ]

kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
Roy Augustine
Ranch Hand

Joined: Jul 08, 2003
Posts: 30
Thanks for your quick reply
I think I got the answer.
The database server has nothing do with any networking. It's only responsibility is to provide the capability to fetch/manipulate data in the database.

So my first assumption - network server is the class that handles the networking- was wrong.
Now I need two database servers even though one of them, the networking server, is just an adapter.
and in Non networking mode I have to bypass the networking server and contact directly to database server.
am I understanding right? Please give any suggestions.
Thanks in advance
Roy
Ken Krebs
Ranch Hand

Joined: Nov 27, 2002
Posts: 451
Roy,
I think your understanding is correct. There may only be one real database server with the networking adaptor just acting as a ultra simple proxy for the real server. As far as the network client is concerned, all it knows is that it's talking to the server and it shouldn't really know or care that it's going through a proxy. Keep in mind that this is not the only way to solve this problem but it is a good one.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: NX: Non-Networked mode
 
Similar Threads
What is Non-Networked Mode?
(NX:URLyBird)Question about instructions:
how to comprehend the "Non-Networked Mode" mentioned in my requirement!
Question about RMI and Non-network mode
gui