• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Please comment my design

 
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 ]
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • 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.
 
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
 
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!