• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To network or not to network

 
Keith Jones
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys/Gals,

I'm trying to figure out way in which the program should work and I have a few questions.

From what I can understand from my reading of the spec we can run the program in three ways:

1. with parameter "server". In this mode the server runs and that's all.
2. with no parameter. The client (and gui) runs only.

*Now here is one point I get confused. Would I be right in saying that the user must now choose between interacting with a local database or specify the IP address of the server to interact with the database file on the server?*

3. with parameter "alone".

*This is the second point I'm confused about. Does this mean that both the server and client run and therefore there is no choice but to use the local database file and therefore no IP address is asked for?

Hope someone can shed some light on this.

Keith
 
josine wilms
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keith,



Networked 1 - many
-------------------
- you start two apps:
One with parameter "server" which starts the server app config window and after accepting the config starts the server app. For example a RMI server.
One or more with a <no parameter> which starts one of multiple possible client apps (Gui clients).


Standalone 1-1
--------------------
- with parameter "alone" you get a config window, after accepting the config you'll get the application window (GUI client) which makes a direct connection to the database file.

You keep the updateable config in a properties file.

Hope this helps you up the road.
 
Keith Jones
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the information Josine,

But I still have couple of issues here. There is no mention of server config. If anything I would have thought that the client would need configuring (IP of last server used for example).

cheers
 
josine wilms
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A parameter can be available in the same properties file for one or the other depending on the kind of question maker
 
Keith Jones
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so what kind of server config would we need?
 
Sam Codean
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my case i have
"server" - Launches only the server but a dialog is popped to find which Database File is to be used (a FileChooser)

"Alone" - once again the file chooser is used to select the file but this time both the Server and Client are launched

"" - launches the client with a pop up asking for Host and port number
Keep it Simple Stupid!!
 
Keith Jones
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Sam,

That's all a good idea except that what gets me confused is that our final output is to be a jar file and one of the contents of that jar file is the database file. So that must mean that the file chooser gets pointed to the jar file and then our PROGRAM should extract the database file from it and then manipulate it accordingly. Surely that can't be right?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic