• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Local and Remote Mode

 
Anurag Mishra
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I want to confirm one simple question that if the client is in local mode and no networking has been performed then where the database will exists, will database will exists on client side.
If i had created one DataClient class which contains all the public methods defined in the dataclass and act as a proxy for the connection.This point is not very clear to me.If the client is in network mode than also it will access the database existing on the client side(GUI Side) and if local mode than also client is accessing the database from the Client side itself. Plz send me some discriptive answer about this Local and network mode disigning. I will be very thankful to you.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your one class should be an interface, then create two implementations of the interface. One for local, one for remote. The local will get the database from the client, and will reside with the client code, whereas the remote class will get the database from the server.
Mark
 
Anurag Mishra
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark
So according to you there are two copies of db.db file is existing both(client & server) side.If yes, than how data will be updated accordingly.plz let me know in a discriptive way how to implement it.
Anurag Mishra
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes there would be two copies of the data file. one you use in local and one for remote. If you had only one, and someone was using it local, and one remote, you would have locking issues, since in local mode you don't need to lock and unlock records. It is kind of an exclusive use of the file.
Think of local as someone in Russia running it on their own machine, whereas the server is located in Japan. Japan has a copy of the db.db file, and the person in Russia has their own copy. The person in Russia never goes to the Japan database.
Kind of long winded, sorry
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic