• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: db location

 
S. Ganapathy
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I have some problem in the specification. It says:

Non-networked mode:
------------------
this mode must use the database and GUI from networked form
Networked mode:
--------------
You may use rmi or serialized objects.
In either case, the program must allow the user to specify the location of the database,
and it must also accept an indication that a local database is to be used,
in which case, the networking must be bypassed entirely.
Running the application:
-----------------------
java -jar <jar_file_name> [<mode>]
mode : server - server program will run
alone - standalone mode
and leftout entirely, network client and gui must run

Here I got confused.If I run the program in server mode, and then if I run the program again for gui client and chose db location, how will the server identify and run with that database. As the server runs on some pre defined db, or in worst case, if one client chose one location of database, and the other client chose another location for database, for the same server, how to resolve the issue.
Can any body please help me.
Thanks in advance.
Ganapathy
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can read "location of the database" as being "location of the database server".
-Barry
 
S. Ganapathy
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Barry,
What will be the probable location of the database. I mean it will be free text. User may type-in machine name/ip address. How do the program know whether it is local machine, or remote machine. In case of local machine, it should work as standalone.
Can you please clarify me?
Ganapathy
 
frank sun
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by S. Ganapathy:
Hi there,
I have some problem in the specification. It says:

Here I got confused.If I run the program in server mode, and then if I run the program again for gui client and chose db location, how will the server identify and run with that database. As the server runs on some pre defined db, or in worst case, if one client chose one location of database, and the other client chose another location for database, for the same server, how to resolve the issue.
Can any body please help me.
Thanks in advance.
Ganapathy

The database file location is apprant to the client, you could disable the user to modify this item. only the server and standalone mode concern the database file location.
Frank
 
S. Ganapathy
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi frank sun,

Networked mode:
--------------
You may use rmi or serialized objects.
In either case, the program must allow the user to specify the location of the database,
and it must also accept an indication that a local database is to be used,
in which case, the networking must be bypassed entirely.

The above is more worrying me. That means, GUI must allow the user to select the database location. But how to pass this databse location to the server, if the server is already up and running? This is more worrying to me. And moreover, "It also accept the indication that a local database is to be used, in which case, the network client must be bypasses". How do the program know whether the selected location is on the same machine, or on the remote machine?
I am glad if any body clarrify this point.
Thanks in advance.
Ganapathy
 
frank sun
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by S. Ganapathy:
Hi frank sun,

The above is more worrying me. That means, GUI must allow the user to select the database location. But how to pass this databse location to the server, if the server is already up and running? This is more worrying to me. And moreover, "It also accept the indication that a local database is to be used, in which case, the network client must be bypasses". How do the program know whether the selected location is on the same machine, or on the remote machine?
I am glad if any body clarrify this point.
Thanks in advance.
Ganapathy

1.assuming these 3 running modes running in 3 different location
2.server needs to set up its host, port and data file location
3.client needs only to setup the host and port it wants to connect, it does not care where the data file is.
4.standalone mode just needs only to concern the data file.
5.the configuration parameters stored in a file suncertify.properties, which located in the app's root directory
6. as the instruction says, we can only run the app using this approach:
java -jar runme.jar [server|alone ]
Hope that help.
Frank
 
S. Ganapathy
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi frank sun,
Now it is very clear for me.
location of the database is the location of the Data object throught which the application "read-write" the data file. This is selected using file chooser. Its main purpose is just read the host name, and rest of the parameters are ignored.
Thanks a lot.
Ganapathy
 
Billy Tsai
Ranch Hand
Posts: 1304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I still dont totally get it
what exactly does stand alone mean?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11915
209
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Billy,
Stand alone means that the application must be able to run without any network, and without running more than one application.
If you need to run a server and a client, then the client is not stand alone - there is an additional application.
Regards, Andrew
 
Billy Tsai
Ranch Hand
Posts: 1304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so standalone basically is non-networked mode(local connection) right?
where no networked server codes are used at all
???
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11915
209
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Billy,
so standalone basically is non-networked mode(local connection) right?
Yep - exactly right.
Regards, Andrew
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic