This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

B&S: Server design question

 
Vadik Mironov
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm working on B&S assignment, specifically on designing server part, and i'm really stuck on requirement about DBMain interface. Do i understand correctly that i'm not bound to exposing as a server this interface (in this case RMI is not possible) and there could be basically several architectural decisions.

Namely, creating DatabaseAccessor which will expose to client nearly the same interface , but with RemoteExceptions, perform locking basing on client cookies (it means that i can change lock method to return cookie) and do all the synchronization stuff. And it will keep internally simple RAF implementation of the DBMain.

Or i can inherit DBMain in my custom DBMainExtended which will contain slightly different method signatures and all the client will use this interface, not even thinking about DBMain.

I appreciate any comments and suggestions on this questions. Thank you in advance!
 
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 Vadik,

It appears that you can get full marks no matter whether you expose similar methods to your DBMain interface to your clients, or whether you only expose business methods.

For more discussion on this, you might like to read the topic "Should lock methods be callable by the client".

Regards, Andrew
 
Vadik Mironov
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm, thanks a lot. Very interesting discussion it is. As for me i probably will go with Adapter similar to DBMain with lock/unlock exposed to clients and AdapterStub GUID as a client identificator in theirs signatures, other methods will stay there with extended Exception lists and probably some other small modifications. Is this safe enough? Or i'm still looking like a guinea pig .

And adding my dime to that discussion, these words:

Your server must be capable of handling multiple concurrent requests, and as part of this capability, must provide locking functionality as specified in the interface provided above.


somewhat confuse me. I'm more inclined to think, that 3-tier solution with buiseness logic exposed only violate the must in quote above. But again it is my feelings and probably i'm wrong. Anyway, thank you very much, Andrew, for this link.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic