• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Architecture question

 
Zlatan Hajric
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I need some oppinions on this, regarding the correctness of the implementation.
This is what I did..


class Data implements DbMain (a must)
class DbAccess that takes care of the read/write sync problems. Protected and used by Data.
now here is the thing

I have a Controler class that implements interface Controlable. That interface is like DbMain but not quite. I created som additional methods that I needed.
In fact there are 2 Controlers. DataLocalControler and DataRemoteControler. Since they both implement the same interface its the interface that is used by the GUI.
So my GUI sees no difference if the database is local or remote. DataLocalControler is strait forward. It uses Data to access the database.
RemoteControler on the other hand uses a remote object that implements the remote interface that looks a lot like DataControler with the addition of Remote exceptions.
The remote object than uses DataLocalControler to access the database.

DataControler (Local )----- > Data (impl DbMain) --> DbAccess <- this is when its done locally


DataControler (Remote) ------ |INTERNET| ----- RemoteDB (impl RemoteControlable and uses DataControlLocal) ---> Data ----> DbAccess


I hope you get the picture. Now here is my dillema
there are 3 modes of starting the aplication.
server where I have a server frame and start RMI
alone Client side (GUI) started and searches for a server , comunicates with the db via RMI

no args both server and client should start and no network connection. In my case I have no need to start the server. I can just start the client in local mode meaning it will use DataControlLocal.
No Am I way off here or is this ok. Note that my project is some 80%-90% finished



regards





 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Zlatan Hajric wrote:
server where I have a server frame and start RMI
alone Client side (GUI) started and searches for a server , comunicates with the db via RMI

no args both server and client should start and no network connection. In my case I have no need to start the server. I can just start the client in local mode meaning it will use DataControlLocal.
No Am I way off here or is this ok. Note that my project is some 80%-90% finished



It's been a couple years I did the certification, so please read carefully your own requirements.. There was no such things as an argument/or lack of that starts both server and client.

- server: start the server
- alone: start the client in STANDALONE MODE (LOCAL MODE)
- no args: start the client in NETWORK MODE

So, if you want to test the network mode you need to :
- start your application with argument "server" which will bind your remote object to RMI Registry;
- start your application a 2nd time with no argument so that it runs in network mode;
- use your client to interact with your server.


When your client is running in standalone mode, it should not use any code related to networking..

Hope this helps,
Alex
 
Kevin Florish
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just finished the assignment and on B&S 2.2.1 and there are three modes as described by Alex.

On my assignment it is exactly how Alex describes it from a couple of years ago. I would read over your run modes and make sure you are
implementing the correct functionality for each of the three modes possible.

Cheers Kevin.
 
Zlatan Hajric
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alex Belisle Turcot wrote:
Zlatan Hajric wrote:
server where I have a server frame and start RMI
alone Client side (GUI) started and searches for a server , comunicates with the db via RMI

no args both server and client should start and no network connection. In my case I have no need to start the server. I can just start the client in local mode meaning it will use DataControlLocal.
No Am I way off here or is this ok. Note that my project is some 80%-90% finished



It's been a couple years I did the certification, so please read carefully your own requirements.. There was no such things as an argument/or lack of that starts both server and client.

- server: start the server
- alone: start the client in STANDALONE MODE (LOCAL MODE)
- no args: start the client in NETWORK MODE

So, if you want to test the network mode you need to :
- start your application with argument "server" which will bind your remote object to RMI Registry;
- start your application a 2nd time with no argument so that it runs in network mode;
- use your client to interact with your server.


When your client is running in standalone mode, it should not use any code related to networking..

Hope this helps,
Alex



you are right

"The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run."

it's the network client and GUI that got me confused

so no args network mode
alone - local

gonna go and repeat that to myselft a couple of times

thanks



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic