File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Cache in Class Diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Cache in Class Diagram" Watch "Cache in Class Diagram" New topic

Cache in Class Diagram

Dan Huskins

Joined: Dec 29, 2004
Posts: 15
I want to implement a caching mechanism on the business tier, perhaps with a Value List Handler.

Couple of questions:

1) I've got my class diagram, more or less, at the 'specification level' (Fowler's UML Distilled). I'm doing my best to keep it technology independent. But, leaving out certain information, such as what type of caching i'm implementing seems to add confusion to the diagram rather than make it simpler to read. How are people handling this? Are you specifying stateless and stateful components, facades, caching, etc in the class diagram? Or is it more 'conceptual'?

2) The J2EE blueprints docs on VLH do not seem to handle multiple threads accessing the cache simultaneously, which would be the case for a common cache. I can think of several good solutions, but i'm not sure of the detail in which i need to address this.

Any help is appreciated. Thanks.
Albert Maurucier

Joined: Feb 18, 2005
Posts: 23

When i began to work on the assignment, i saw that there're many opportunities to use caching, performances will be really increased, i was facing many alternatives:
-caching search results with a value list handler and stateful strategy,(for paging) but it seemed to me that there's no need for this, the number of displayed flights for a given itinerary at a fixed date and time isn'nt really high
-caching a flight schedule with a VLS and singleton POJO strategy (loaded at server startup). Acess to this cache is multi-threaded
-caching all possible served routes and related flights between two cities , avoidind the overhead to execute the search algorithm at each search request(for complex routes), i'll use the same strategy as above. ( a "Connection Builder" may also run at fixed time to update the cache)
Few days before uploading, i left all these scenarios, i take the "keep it simple" way.
For your first question, your class diagram should be built upon business entities only. Show your caching mechanism in the components diagram with explainations in your text

[ August 12, 2005: Message edited by: Albert Maurucier ]
Dan Huskins

Joined: Dec 29, 2004
Posts: 15
Thanks Albert.

My brain has been transfixed upon this caching problem for some reason... it's difficult to move past.
I agree. Here's the link:
subject: Cache in Class Diagram
jQuery in Action, 3rd edition