• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to process the networking with a local database?

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the instructions, here is a sentence describing the networked mode.


Your choice of RMI or serialized objects will not affect your grade, but no other approach is acceptable. 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, the networking must be bypassed entirely. No authentication is required for database access.



I have two questions that maybe I misunderstand.

1. and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely.
If the Server accept a local database, and locate in a computer which is different from one the Client do, what do it mean? If the networking should be bypassed?
Indeed, I can't understand the sentence.

2. No authentication is required for database access.
If it mean a security manage is not required in accessing database?


best regards
Along
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. What that menas is that in local mode there is no server running.

2. No security is needed for the Data file. No Username No Password.

Mark
 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Along,


2. No authentication is required for database access.
If it mean a security manage is not required in accessing database?



Normally with jdbc we need to provide userid and password to get a connection to db. This database access authentication is not required here.


1. and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely.
If the Server accept a local database, and locate in a computer which is different from one the Client do, what do it mean? If the networking should be bypassed?
Indeed, I can't understand the sentence.



I came to the same situation while reading the first time. After reading the entire requirement I understood that "stand alone" version is referred by "the networking must be bypassed entirely".


In either case the program must allow the user to specify the location of the database


interested me. What I understood follows. This should be applicable in client server mode alone. What is meant by "either" above is "your choice of RMI or Seialized objects". In this case the user should be able to specify a database location. Database location is nothing but server location itself.

The database is a collection of entities including the .db file, the accessor utility (server) , locking mechanism, DB interface and the class implementing DB interface.

Remember that we are just creating a database and a database client dedicated to an application. The database and database client can run in same jvm or in multiple machines.



and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely.


This is applicable only in stand alone mode. This indication is the mode flag itself.



If the Server accept a local database, and locate in a computer which is different from one the Client do, what do it mean? If the networking should be bypassed?



Server itself is the database. I am assuming that .db file can be either in the same machine as database runs or in a different machine. It really doesn't matter because whatever be the mode the server will know where the .db file is. The user don't have to bother about the location of .db file.
[ October 29, 2004: Message edited by: jiju ka ]
 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All you need to do is in GUI. If the GUI is run under client server environment, provide a field to user to specify the server location. GUI will convey the location of server to network client. Network client will use the server location to locate server.

If the GUI is run under stand alone environment don't provide a field to user to specify the database location. Because the mode indicates the GUI to bypass the network and find the database in same jvm.

This is something I like with SUN's testing strategy. Eventhough this requirement is a puzzle - the emphasizes is on the need on a developer to understand requirements and avoid assumptions. You have done a good thing in asking this question.

[ October 29, 2004: Message edited by: jiju ka ]
[ October 29, 2004: Message edited by: jiju ka ]
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jiju,

In the gui you described, for local mode:

1. Would you have the user provide the physical file location of the db file in say a drop down menu, say File > Connect.

2. And if so, should you disable all buttons until they connect as well?

thx
 
Along huang
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with jiju vary much!

There are some requirements that puzzle candidates, however, those requirements whip up candidates to find the answer, in this process, it trains you to become a mature developer.

thank you for reply!

Along
 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sean,
I assume you meant standalone mode by local mode.


1. Would you have the user provide the physical file location of the db file in say a drop down menu, say File > Connect.



My suggestion is "No". The users are not supposed to know the physical file location. I would rather put it as a configuration parameter with the database - read it from a file.

There are several pros and cons on having client vs server(database) having file location.

Suppose there are 10 clients. Each client need to know what that field (file location) in GUI means, the value of file location if it need to be typed. What will happen if the file location is changed? If there is an old and new location some users may still point to the old file by mistake.

Instead if you have the file location with server, you need to change it at only one place and "not needed to communicate the change to the clients".

CSR's (clients) normally don't do configuration stuff. Specialized role like administrators do that. If you wan't to have configurables changed using a GUI your best bet will be to have extra screens for administrators. Since the project is like a learning test you can add as many features to it as long as you are not violating any musts.

If it was me I will not consider adding new features until I implement all must's. Later the new features can be considered to be added. There comes the need for an iterative development.

According to me File location has to be encapsulated with database. There may be different opinion. To those ask these question: In an Oracle or db2 database do the client (jdbc programmer for example ) need to specify physical database file name or location (not table, schema or table space)?

[ November 01, 2004: Message edited by: jiju ka ]
[ November 01, 2004: Message edited by: jiju ka ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi jiju,

Thank you by all your explanations. When you say:


"The users are not supposed to know the physical file location. I would rather put it as a configuration parameter with the database - read it from a file."

1- That suggestion doesn't apply to the below "must", in this case the configuration parameter must be read from the GUI and stored in a suncertify.propierties file, on the other hand, It can be interpreted as you have explained before?

2- And, What is the meaning of "must be persistent between runs of the program"?

quote:
--------------------------------------------------------------------------------

All configuration must be done via GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.propierties.

--------------------------------------------------------------------------------

THK
Rocio
 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


2- And, What is the meaning of "must be persistent between runs of the program"?


If a configurable parameter is altered it should be stored(write to suncertify.properties ). The next time the application is brought up you should read the configurable value from suncertify.properties If you do this you should be careful though - the event/time from which the new configuration is effective is extremely important. Basically you have to make sure that "While the configuration change happens a user is not disconnected and connected to another file between his/her writes" - so locking the whole file is must in production environment. Because of this reason it is too risky to implement this feature. Or alter configuration only in stand alone mode. It is not a must from Sun though.


1- That suggestion doesn't apply to the below "must", in this case the configuration parameter must be read from the GUI and stored in a suncertify.propierties file, on the other hand, It can be interpreted as you have explained before?


I understood your point. If I were to allow configuration change, my choice is to have a separate screen for configurable parameters. So there will be a mutually exclusive set of screens the users and administrators have access to.

If you combine the user and administrative screeens into one the application can enter inconsistent state.

In a typical development environment the development happens in several phases/tiers. There will be a development, integration, acceptance and production tier. There will be more than one db file too. If a client changes file location the change actually takes place in server(database). Depending on who changed last all clients will point to the last specified location - result data loss, uncommitted transactions and lots of frustration.
 
Everybody! Do the Funky Monkey! Like this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic