This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

report creation architecture

 
rivka zam
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends



I need help with a design question (not directly connected to struts):



I have a J2EE application that works on an application server (WEBSPHERE) and also a database server.

When clients run requests for various reports � where should the report files be created?

I don't want the files to be on the clients PCs. Do I need another server for the users output/input files?



Also, can anyone direct me to a good article / example for report creation with Struts?





Thanks a lot

Rivka
 
Scott Selikoff
author
Saloon Keeper
Posts: 4028
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really you can put the files anywhere, the only reason to move it to a different server would be for performance and/or security. For example, you may not want anyone except high levels administrators reading files on the application server, so you might put reports on a less restrictive server.

In general, you'll probably want to use the database for 1 of 2 things. First, to keep a record that the report was generated with some basic information in it. With this record, you can then have your application load information about the record and present it to the user at a later time such as "show me all reports I've generated and the date I generated them on".

Second, the reports themselves *CAN* also be put in the database, although its a common practice in most situations. Usually, you store in the database a link to the file and place the file somewhere else. Naming the file on the network can be difficult since probably want to put a unique id or user folder to avoid conflicts. For example, users should be able to create multiple reports with the same name (not neccessarily), so having a partially generated file name is useful for scalability and support.

Finally, when the user does request the file, the application server should read and transmit it for them. Whether its in a database or on a network drive, its probably not good (usually not even possible) to expose the real network path to the file.

There are application servers that specialize as file repositories even providing some APIs for accessing them and integrating them with your application servers. It depends on your business requirements what you decide to do.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4028
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I forgot to mention the best reason for using another server is really scalability. It doesn't actually have to be a separate server, just like you can house your database server and WAS on the same box, you can add a file repository server on that box too. Once your files are in some central repository you can then access them via other servers or methods and are not restricted to only using the original application server that made them.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic