Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: Starting Server and Specifying DB Location

 
Bill Robertson
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I run in standalone mode the user can type in the directory and
name of the database, or they can use the file chooser to locate
the database. This is the easy part.
But when you run in server mode how would you implement the file
chooser options? or even simply letting them type in the directory?
I dont understand how the application would know that the directory
and database name selected is on the server and not the client machine?
Am I missing something? Do we even need to do this when running in server
mode? Do we simply just need to prompt for server location and port and
forget about the file directory?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12012
218
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill,
I think that for this assignment, you might want to have a GUI for the server. This goes against the grain normally, but if you want to have a button to shutdown, and a way of specifying the port to be used, or the directory where the database resides, then you probably should look at a GUI.
You could also have a text interface, where your Java program presents a menu on the screen allowing the user to enter those pieces of information manually. A little less user friendly than the GUI, but it means the server can run on a computer without graphics capabilities (or could be started via a telnet session). If you put a timeout on the menu (auto start in 10 seconds unless menu option chosen) then startup could even be scripted (which is what I want in a server app). But I think that I am going overboard with these suggestions ;-)
Of course, if you don't want a user friendly server, then you dont really have to offer any configuration on the server.
Regards, Andrew
 
Bill Robertson
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andrew, as always thanks for your reply.
But there is one thing I am not understanding. In server mode, how does
the "fetching of the database" know to look in the directories of the
server and not the gui client. Is this a part of RMI i am not understanding?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12012
218
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill,
Are you asking how the client specifies the location of the database when running in networked mode?
In which case, in my opinion, the location of the database specified by the client is the server name / port the client connects to. It is not the physical location of the database file on disk.
Regards, Andrew
 
Bill Robertson
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok great. This is what I was hoping for because I did not want
to have to specify the physical location of the database via server/network
mode.
thanks andrew!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic