• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

NX: Non-Networked mode

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I have a problem in understanding Non-Networked Mode part of my assignment. My assignment says


Non-networked mode
The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.
The operating mode is selected using the single command line argument that is permitted. Architecturally, this mode must use the database and GUI from the networked form, but must not use the network server code at all.


I thought by database they mean all the data base management part including classes like Data, DataCache, and DataAdapter. And network server code in their second paragraph means all the classes used for accessing the database while in network mode including classes like Server. So I developed my project in a way so that, both networked and non networked mode using the same GUI and database part( database part I just described above) and in non-network mode it will not use the network server part.
But now after reading different postings I have a feeling that, by database they mean just the data file and DataCache and server means Data class that implements the DB interface. and also network server code means server used by network clients. So now I feel like there must be two servers one network server and another non network server both implements the Data class and in non networked mode application uses the non-networked server and must not use the network connection part.
So what you guys think, whether I need to rewrite my code so that I have two server part or my first approach was right?
 
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Roy,
I couldn't answer your question with any degree of certainty without knowing specifically what each of your classes are actually doing.
You might want to think about the problem something like this:
The database server has nothing do with any networking. It's only responsibility is to provide the capability to fetch/manipulate data in the database.
The networking server is an adaptor for the database server that provides the networking capability and simply delegates the real database work to the database server.
It's a good design practice to separate such disparate responsibilities into separate classes.
[ January 01, 2004: Message edited by: Ken Krebs ]
 
Roy Augustine
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your quick reply
I think I got the answer.

The database server has nothing do with any networking. It's only responsibility is to provide the capability to fetch/manipulate data in the database.


So my first assumption - network server is the class that handles the networking- was wrong.
Now I need two database servers even though one of them, the networking server, is just an adapter.
and in Non networking mode I have to bypass the networking server and contact directly to database server.
am I understanding right? Please give any suggestions.
Thanks in advance
Roy
 
Ken Krebs
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Roy,
I think your understanding is correct. There may only be one real database server with the networking adaptor just acting as a ultra simple proxy for the real server. As far as the network client is concerned, all it knows is that it's talking to the server and it shouldn't really know or care that it's going through a proxy. Keep in mind that this is not the only way to solve this problem but it is a good one.
 
You had your fun. Now it's time to go to jail. Thanks for your help tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic