Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data Instances in RemoteData

 
Padmaja Prasad
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have seperate Remote Data instances for each request. But only a single Data instance for any number of remote connections. Do I need to allow Remote Data to accept any number of db files(Eg: db.db, cust.db, flight.db, etc.). If so, I need
Seperate Data and Lock Manager instance for each different file and I may need some collection object to hold the references of open Data & Lock Manager instances for each db file. How did you guys solve the problem??
Thanks
Padmaja
 
Stephane Weber
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Padmaja,
You would indeed have to cope with multiple Data objects and to (in any way you find best) make your LockManager able to handle locks on multiple files at a time.
However, in this assignment, this is not required. You just have your db.db database, and you shouldn't have any other database file. (I asked a similar question because I had a bookings database, and someone here answered me very clearly that this was not useful, and more importantly that it was dangerous to begin creating databases, when it is not asked for in the assignment).
So my advice would simply be not to use multiple databases.
Of course, if someone here disagrees, please say so
Hope this helps,

Stephane
 
Padmaja Prasad
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Stephane,
Thank you for your response.
I have no idea of creating multiple db files. But suppose, in future, FBN want to add more tables to the db & give access to them to the clients, our RemoteData class must be able to provide this with out any change in the class definition. If so, I need some collections to keep track of all open files.
At present, my Remote Data will accept & open any db file, but once a file is opened in Remote mode, the server will serve only this file to all clients. The clients will give only the ip address and port as arguements. (No file names).
Do you think my present design is OK??
Thank you once again,
Padmaja
 
Stephane Weber
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use the exact same design as you described, so I would be tempted to say it is ok ;-)
From reading the posts here for quite some time now, I have also seen that a lot of people use also the same.
It is however true that this would not be sufficient if several database files would have to be managed by a RemoteData object.
Stephane
 
Padmaja Prasad
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Stephane,
Thank you so much.. Now I can proceed to the rest of the design...
Thanks
Padmaja
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic