views:

61

answers:

2

I have a vb.net 2.0 winforms project that is full of all kinds of business reports (generated with Excel interop calls) that can be run "on-demand". Some of these reports filter through lots of data and take a long time to run - especially on our older machines around the office.

I'd like to have a system where a report request can be made from the client machines, some listener sees it, locates a server with low-load, runs the report on that server, and emails the result to the user that requested it.

How can I design such a change? All our reports take different parameters, and I can't seem to figure out how to deal with this. Does each generator need to inherit from a "RemoteReport" class that does this work? Do I need to use a service on one of our servers to listen for these requests?

+2  A: 

One approach you could take is to create a database that the clients can connect to, and have the client add a record that represents a report request, including the necessary parameters which could be passed in an xml field.

You can then have a service that periodically checks this database for new requests, and depending on how many other requests are current processing, submit the request to the least busy server.

The server would then be able to run the report and email the file to the user.

This is by no means a quick solution and will likely take some time to design the various elements and get them to work together, but its not impossible, especially considering that it has the possibility to scale rather well (adding more available/more powerful servers).

I developed a similar system where a user can submit a request for data from a web interface, that would get picked up by a request manager service that would delegate the request to the appropriate server based on the type of request, while providing progress indication to the client.

Jason Miesionczek
Good solution design for the problem
Chris Lively
This sounds like the kind of thing I see working for us. The biggest problem I see is that we have all sorts of arguments that get passed into the actual report generators - arraylists included. How can you save that kind of data to a database "argument" column?
Jeffrey
if you are using SQL Server, there is a data type called XML, which if you are using VB.NET you should be able to encapsulate your report parameters into an object and then serialize it and pop it into that column
Jason Miesionczek
Awesome. Exactly what I was looking for.
Jeffrey
it would also work just as well with a normal text based column, its just XML text that would be deserialized by the report server
Jason Miesionczek
A: 

How about write a web service that accepts reporting requests. On completion the reports could be emailed to the users. The web service can provide a Status method that allows your WinForms app to interrogate the current status of the report requests.

RedFilter