• 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

Server Configuration

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having a GUI for Server Configuration. It lets the user specify the location of the database file & the port number.

Should I validate the database file on server configuration screen only or should it be validated by the Database side. I mean the only when Data class tries to open the file & finds that there is no file or maybe the file is incorrect , the error is thrown!

I think Database File Validation should be Data class responsibility only. But the problem is that this defect is caught only when a connection is made by the client. Is this OK for the assignment or in general???

Animesh Saxena
Wipro Technologies
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Animesh,

No answers, just questions

What benefit do you perceive in having a server running that (potentially) does not have a valid data file?

What happens when the client connects and the server then discovers that the file is corrupt? Do you tell the user? Or just kill the connection? Or try and fake it?

If you do tell the client that the data file is corrupt, what can they do about it?

If you were to validate the data file at the time the server is started, what can the person starting the server do about it? Is this more than what the client can do about it?

And to put this in real-life terms: If the production database doesn't work, you are likely to get paged to fix it. Would you rather get a single page from the person working on the server itself, or would you rather get 100 pages from clients all over the globe who can only tell you that the server is not working?

Regards, Andrew
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic