• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please comment my design

 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11852
185
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mihai,

Looks good to me.

Regards, Andrew
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Andrew and thanks for your comments.

Regards,
Mihai.
 
Wagner Danda Da Silva Filho
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic