• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Client Startup and options

 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The requirements say the following:
"You can choose between RMI and Socket. 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 networking must be bypassed entirely".
I am unsure of the above. Does this mean the client can specify the location of the remote database to connect to? How could that work, a client may run on a WIN NT box on Europe while the server may run on a Solaris in Kansas? Is it acceptable for the user to speceficy the location of the remote database like "/home/blah/blah/db.db" when connecting remote? Shoulnt this be transparent to the user?
Please supply your valuable inputs in the matter. This requirement is quite vital as then when starting the server, one would not need to specify the remote database???
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does this mean the client can specify the location of the remote database to connect to?

Yes. That means if the server is on a solaris in another country there needs to be an ip address that you can use when starting the client to tell it where to find the server.
As far as when you start the server, the db.db file will most likely be in the same directory.
The reason why this is acceptable is in the requirements. It states there are about five things you can have the assessor to type in as arguments to starting the client, and one of them is the location of the server.
You need this in case they move the server, the client never has to change.
You can supply any means for the client to receive the location of the server. Via command line parameters, a startup screen that the user can chose either local or remote mode, and if they chose remote you have a JTextField that allows the user to enter the "URL" of the server.
Some people have even made the client have a menu item for chosing location so you could actually change the mode on the fly.
I chose the command line since I thought it was easier.
Hope that helps
Mark
 
Mathew Sam
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It makes sense if you say client can specify the database location in local mode.When in remote mode why should the client specify the file location because the server might have started before the client with a valid file location.Is it not ?
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark,
I am sorry but I couldnt follow you through. Are you saying that the client should be able to provide the location of the Remote DAtabase? And that the server need not be given a database name when starting?
Thanks for the input.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, If the client is in local mode it states where the db.db file is. If the client is in remote mode it states where the server is. Meaning RMIRegistry location really.
The client does not tell the server where it can find the db.db file. When the server is started it states where the db.db file is.
Hey, I think I just came up with a better way to explain Local vs Remote. In local mode it is without RMI or Object Serialization, in remote mode it runs with RMI or Object Serialization. Whichever you are using RMI or Object Serialization. Think of stand-alone(local) vs Data residing in a central location for multiple users to use.

Mark
[ January 25, 2002: Message edited by: Mark Spritzler ]
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its this line that gets to me
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 networking must be bypassed entirely".
Looks to me that it is saying which database to use from the client but also tell the client to use remote or local access to it.
 
Renzo Zanelli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I allow the user to specify the name and location of the remote database. In my design, the server is just a proxy (a decorator really) that provides the database with the ability to accept network connections.
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would think that would be what the requirements say. This will enable easy switching from remote/local mode as the database name is the same. I was however not sure if specifiying the database for remote processing was a good idea.
If we supply the remote database it becomes easy at start up to determine which mode to use by showing the user with a splash regarding the same.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic