• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Synchronous and Asynchronous Report generation

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want to generate a report which can have a million records pulled from the database. I want to display the report in synchronous ( if the user asks for the report, I should show it on the screen) and asynchronous way (we can send an email or any other notification after we generate the report in the background).

My questions are:
1) What is the good strategy to do this task?
2) What considerations I need to make for it in terms of database and other resources.

Any inputs are appreciated.

Thanks and regards,
Karan
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Karan,

Well firstly if your report can return up to a million rows, I'd certainly look at making sure that performs well, especially if you are planning on offering the result synchronously!

In order to have the report generated asynchronously and made available to several other requesters you'll want to look at kicking off a separate thread to perform the work and store the result somewhere for later retrieval.
 
We don't have time to be charming! Quick, read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic