aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes What is 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 "What is Non-Networked Mode?" Watch "What is Non-Networked Mode?" New topic
Author

What is Non-Networked Mode?

pkinuk Buler
Ranch Hand

Joined: May 22, 2009
Posts: 62
Hi, dude

I received a assignment today. I get confused about the assignment:
What is non-networked mode? dose it mean the server and client will run on same mechine?
What is loopback networking?
What dose it mean using single line argument that is permitted?
Waht does it mean: this mode must use the database and GUI from the networked form, but must not use the network server code at all.

I copy the full requrement about my assignment about the 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.


Thank you in advance.

Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2247

Howdy, Pkinuk! First of all, welcome to JavaRanch and good luck with your assignment!

What is non-networked mode? dose it mean the server and client will run on same mechine?


Not really. In fact, the server must not run in non-networked mode (or standalone), otherwise you'll fail.

Basically, the application that you are going to create must be able to run in 3 modes: client, server and standalone. When the client runs, the server must be already running. You are going to allow the user, via a GUI that must use Swing elements, to perform some business operations that are listed in your instructions.html file. In this mode, the client only makes requests to the server, and the server deals with the data that is in the file that was sent to you, and will have to guarantee data integrity via the locking mechanism. This is the client mode. In server mode, the only thing that you have to do is start the server, so that it can receive requests from a client and handle the data that is in the database. Essentially, you will have to use either RMI or Sockets and the operations that you will offer to the client will depend on your choice between thin client and thick client. If you want to have a thick client (which is the case of my application), you'll end up having a remote interface that looks almost like the interface that was provided to you. If you want to have a thin client, you will end up having a remote interface with some business methods (like search() or book()), and your client will use it to perform the operations that you must offer. And finally, in standalone mode, the data that was supposed to be handled by the server is handled locally, without the help of the server.

What is loopback networking?


I think this might be helpful.

What dose it mean using single line argument that is permitted?


It means that your program must not require any properties when running it from the command line, other than the application mode. The only arguments that your program must allow are:

java -jar runme.jar server - this is to run the application in server mode
java -jar runme.jar alone - this is to run the application in standalone mode
java -jar runme.jar - this is to run the application in client mode

So the only arguments that your program has to expect are "server" and "alone".

Waht does it mean: this mode must use the database and GUI from the networked form, but must not use the network server code at all.


This is the standalone mode. It means that the data will not be handled by the server; instead, you'll have to create a code that is able to handle directly the data locally, without using the server code. It's important to remember that the locking mechanism must work in both server mode and in standalone mode, even though you'll have only one Thread dealing with data.

And that's pretty much it. You'll still have other doubts during the development. One good tip is to use the Search of JavaRanch, since it is pretty likely that other people also had the same doubts that you will still have. The good news is that, about 85% of the things you have to know to finish the assignment can be found here. But, if you are not able to find your answer, feel free to come here and post your question. We'll do our best to try to help you!


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
pkinuk Buler
Ranch Hand

Joined: May 22, 2009
Posts: 62
Hello Roberto Perillo, thank you very much for your detailed information. However, I still have some questions about this the networked mode & non-networked mode.

I've decided to use RMI to connect the server and client. Which format does the examiner expect to start the server in networked mode & non-networked mode :

a. The examiner will run the server manually before the first client try to connect.
b. The server will start automatically when the first client try to connect.

How do the examiner expect the client connect to the server in networked mode in the networked mode?
a. Will they run the client and server on the same machine
b. Will they run the server on one machine and using different machines (it means client mode runs on different machines) try to connect it?

Can I just use the port ID 1099 when the RMI run the register process in this exam? Because I have completely no idea what the port ID means.

Thank you in advance.





Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2247

Howdy, champion!

Which format does the examiner expect to start the server in networked mode & non-networked mode :

a. The examiner will run the server manually before the first client try to connect.
b. The server will start automatically when the first client try to connect.



Well, I guess we are not really able to know that... the server must be started manually (that's why we can start the application in server mode, indicating a flag in the command line) before the first client tries to connect to it. But this is a situation that can happen: what if the client tries to connect to the server, and it isn't running? You can show a user-friendly message to the user, saying that the server indicated might not be running.

How do the examiner expect the client connect to the server in networked mode in the networked mode?
a. Will they run the client and server on the same machine
b. Will they run the server on one machine and using different machines (it means client mode runs on different machines) try to connect it?


Well, I'd say that your application has to be prepared for both situations.

Can I just use the port ID 1099 when the RMI run the register process in this exam? Because I have completely no idea what the port ID means.


The port ID is just where the server will run. I think this is a decision to be made; in my case, the user decides the port where the server will run. Maybe, if it is already being used, the user can indicate another port (assuming that it is pretty likely that whoever is going to start the server has more of an "admin" job, so he/she will know that). But if you prefer, you can just say that "or it is port 1099 or no deal!". Just think about and make your decision!
pkinuk Buler
Ranch Hand

Joined: May 22, 2009
Posts: 62
Hello Roberto Perillo, thank you for your reply again.

I think I start to understand how the networked mode runs now, but I still have some questions about how the non-networked mode runs:

Do all client programs need to be run on same machine to access the same source file in the non-network mode?

e.g. A client application try to update the source file, but in the same time B client application opens on the same machine and performs another update. Does it mean the B client application has to wait until A client application finishes the update? If this is what examiner expects, How can I synchronize the update?

Thank you in advance.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4919
    
  10

Hi pkinuk,

You have to read your instructions more carefully. It clearly states:
You may assume that at any moment, at most one program is accessing the database file


Meaning: in non-network mode (also called the standalone mode) there will be 1 client application accessing the database file. In network mode the server application is accessing the database file and an unlimited amount of client applications are communicating with this server.

Kind regards,
Roel


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Nicolas Kal
Ranch Hand

Joined: Sep 09, 2009
Posts: 69
Hi pkinuk,

If you want you can have a look at the following thread. A similar discussion exists on the last posts regarding file access.

Regards,
Nicolas


SCJP 6.0 , SBCD (Preparing..),
MSc Enterprise Systems Development, BSc Computer Science
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is Non-Networked Mode?
 
Similar Threads
(NX:URLyBird)Question about instructions:
NX: Non-Networked mode
NX: What is loopback networking
Who can hel me?
how to comprehend the "Non-Networked Mode" mentioned in my requirement!