Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLyBird: Multiple servers?

 
Matt Sheehan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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.
 
mike acre
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks Andrew.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic