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

Only Server Side DB locks

 
Dushy Inguva
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody !!!
I have just downloaded my assignment (URLyBird). I'm finalizing my architecture. I'm pretty much leaning towards the three tier architecture with RMI.
I would not be exposing the db through a remote interface. From the DBMain interface, the lack of context (cookies/unique client identifiers) in any of the db methods suggest that locking and unlocking are thread based. (A thread gets a lock and can unlock it)
In such a case, since there is no guarantee that a client will be served by the same thread on the server, it is not possible that the client holds db locks. So, my db locks will be only on the server side and i will only be exposing business methods to the client.
1. Do you know if anyone is allowing clients to lock records and hold them between method calls ?? In such a case, do you modify the DBMain interface ?
2. If you are exposing the DB through a remote interface, does it pretty much act as an adapter pattern?
Thanks
Dushy
SJCP
SCBCD
 
Dushy Inguva
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops !!!
Looks like i did not do enough reading in the forums before shouting aloud !!! I have now understood that an instance of the Data class can be created per client. (ConnectionFactory et al)
But, i still wonder !!! Do i have to expose the locking and unlocking to the clients ?
Dushy
(This time, i remembered to putin my signature only once -- cheers !!!)
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dushyanth,
Have you looked through the arguments in the thread "Should lock methods be callable by the client"?
Regards, Andrew
(I knew I would be able to point people at that thread sooner or later )
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic