wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Please comment my design Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Please comment my design" Watch "Please comment my design" New topic
Author

Please comment my design

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 916

I have the URLyBird 1.3.3 with the non-cookie mechansim. My look block
locks like :


I choose the 3 tier design and I decide to hide the lock/unlock methods from the client side.
My client implements only book, search and delete methods (DataClient interface).
I have two type of clients a local one and a remote one (the remote client extends the local one and the Remote interface). This the front tier.

On the middle tier I implement the DBMain in Data class. This class composes two other classes the LockManager and the DataAccess. The DataAccess provides acess to the records and LockManager allows the concurent access to the record. Because the DataAccess is responsible for the I/O operations it has all the methods synchronized.
The DataAccess is the back tier (at leat I hope so).

Because I need to indetify every client, each client will have its own DataClient(only book, search and delete methods) instance, every DataClient (instance) contains its own DBMain instance. The DBMain instances are builded with a factory and all the the instaces will share the same LockManager and the DataAccess instances.

I try to draw a picture for only one client:

By "cliet" I mean the client GUI.

Commens & Cirtics are welcomed.

P.S.
I don't know why the picure is now diplayed in the way I want to.
The DBMain contains the LockManaget and the DataAcces so the "/\" must poit to the DBMain.

Regards,
Mihai
[ November 10, 2005: Message edited by: Mihai Radulescu ]

SCJP, SCJD, SCWCD, OCPJBCD
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11404
    
  81

Hi Mihai,

Looks good to me.

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 916

Hi, Andrew and thanks for your comments.

Regards,
Mihai.
Wagner Danda Da Silva Filho
Ranch Hand

Joined: Mar 21, 2003
Posts: 80
Hello Mihai,

could you comment a little more about the implementation of "DataAccess"? What are its methods?

Did you create any class to wrap the data records? For example: Row, Column, etc..


SCJP, SCWCD
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 916

Hi Danda

My the DataAccess has two componenbts :
1.The DataAccess it defines the access mode to the data from the URLyBird persitent inventory (database) - I/O operations.
2.The DataScheme defines the data architecture for the URLyBird project database.

In a few words the DataAccess implemetation uses a RAF to read/write the database file. The records file pointer are calculated usign the DataScheme.

The DataAccess has a syncronize warpper and it is used in my Data class.


Regars,
Mihai
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please comment my design
 
Similar Threads
Client ID locking???
URLybird
Is my lock mechanism correct ?
RecordNotFoundException in each method
isLock(int):boolean method and the synchronized block