Hi, I'm working on URLyBird . Here is a "must" that Sun gives under the heading "Non-Networked Mode": "" In other places in the document, it says that the non-networked mode can't use any king of object serialization, and the like. Since this condition is a Sun "must", and failing to understand the condition can result in immediate failure (which is unpalatable given the monetary cost), is the following design sound and passable, or will it be flunked out right? The GUI code is identical in either mode (non-networked or networked). The GUI code instantiates an AbstractServer class using a factory object which returns either a LocalServer object or a RemoteServer object (LocalServer and RemoteServer extend AbstractServer). The GUI code, the LocalServer (and its associated database file), all, of course, run within the same Java virtual machine. The LocalServer uses the Sun provided Java interface to communicate with the local database file. No networking or object serialization occurs. The GUI code runs in a separate Java virtual machine from that of the RemoteServer and its associated database file. So, it is only here that there would be a network connection between the GUI and the RemoteServer. So, the GUI code is identical (it always talks to an AbstractServer, sending requests and getting responses using standard Java calls within the same Java virtual machine). My Question: In non-networked mode, the GUI "must not use the network server code at all." So, does my design meet this "must" condition? For LocalServer and RemoteServer are two distict objects, though, obviously, they share variables and methods from the AbstractServer which they extend? Thanks, Javini Javono [ January 08, 2004: Message edited by: Javini Javono ]
Hi Javini, Welcome to this forum. I'd like to me more talkative in this thread, but I simply cannot find anything to add. I even guess that a few of us will bookmark this as a reference . Please keep around ! Do share your ideas/knowledge with all of us. This forum is living thanks to posts like yours above. Best, Phil.
Joined: Dec 03, 2003
Hi, Actually, let me re-word my question somewhat, as I noticed a typographical error in the question. The proposed set-up (and note, I'm not sure that it can be set up to actually work in some implementation) is that using RMI, the server basically doesn't change significantly thus: JVM_1 GUI <--Pure Java--> LocalServer <--Pure Java--> Java Interface to client DB JVM_1 JVM_2 GUI <--RMI--> RemoteServer <--Pure Java--> Java Interface to server DB Where the GUI obtains an AbstractServer reference from a factor method, and this reference is one of two objects: LocalServer and RemoteServer. So, given the fact that the LocalServer and RemoteServer extend the same class, AbstractServer, (and, thus, they share some variables and methods) 1. Will this result in an immediate flunk? 2. Will this violate the spirit of Sun's "must" condition? Thanks, Javini Javono
Joined: Jun 02, 2003
Hi Javini, "No" to both questions. By using polymorphism as you do, you perfectly fulfill the requirements as stated above : "Architecturally, this mode [i.e., the non-networked mode] must use the database and GUI from the networked form, but must not use the network server code at all.". I guess it will be confirmed by other people. Best, Phil.
subject: NX: "Must" condition for "Non-Networked Mode"