• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

What is Non-Networked Mode?

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
pkinuk Buler
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic