Since many of you have been seasoned Struts user, I wish to ask this question (posted 
on javaranch too, alas got no reply):

I am working on a utility API. Basically, this would be an web-app with a servlet that 
will load some data from various property/text files into Hashtables (or classes 
extending HT), cache it using OSCache for, say 1 week, and service client requests. 
This API or application would be made using Struts. 
Another application (which can be any web-application, the Utlity API shouldn't bother 
about it), lets call it client application, has a servlet that will send request to 
this API (say request for translating a word to another language). The API will search 
for the translation in the Hashtables and return it to the servlet if found (or an 
empty string if not found). 

I am really not able to imagine the design part of it. My API should have abstraction 
so that any client API can use it. The API on the other hand should be something like 
a service (apart from usual java classes) that updates the data after the OSCache TTL 
expires automatically. Actually I am envisaging a Servlet in the utility API because I 
need some sort of service that automatically reads the data from property/text files 
periodically (as per the TTL of OSCache) and has the Hashtables loaded in memory, 
ready to respond to the client Servlet. 

I could have kept the hash data in a database but I want to avoid that. The data is 
not changing too frequently and is hence cached and updated only in say a week or so. 
The client Servlets would be given responses based on this cached data. 

Is the Struts framework suitable for this server-side Utility API (I ask this 
especially beacuse this API does not need any gui except that for the administrator)?

Debashish Chakrabarty
http://www.jroller.com/page/debashish




Reply via email to