• 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

URLyBird: Multiple servers?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am just getting started on this and was wondering: is the db file expected to be used by multiple servers simultaneously? That probably wouldn't make any sense, but I just wanted to make sure.
 
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, does your spec not say 'you may assume that at any moment, at most one program is accessing the database file' That program being the one you are writing.
 
Matt Sheehan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.
So does that mean that no two servers will read/write the file at the same instant, or that two servers won't run at the same time with a reference to the same file? I guess what I'm asking is can a server get information from the db file and then assume it will be the same until that server changes it.
 
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 Matt,

Welcome to JavaRanch and this forum.

You should assume that the examiner will never run two instances of your server at the same time. Nor will they run two instances of your stand alone client at the same time. Nor will they run your server and a stand alone client at the same time.

There will only ever be one application running that can directly modify the database file.

There may be several clients running in client/server mode, but they will not be directly modifying the database - they will be using the server to do all the modifications.

Regards, Andrew
 
Matt Sheehan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Andrew.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic