I am having a situation where clients from a browser submits Http requests to generate reports. Typically the reports takes from 1 min to 20 minutes to run.
In our current implementation, there is a servlet that gets the reporting request and processess synchronously.
Some times we see the app hanging etc.
So,I wanted to introduce messaging to this and decouple the client from the server.
1. The servlet writes the report-request to a JMS queue
2. There is a QueueReceiver which asynchronously reads the report request and sends a message back to another queue,
which the servlet ( from step 1 )is reading. I am planning to use co-relation ids for identifying the response
3. Now the servlet ( from step 1) will synchronously try to read with timeout ( if the report-request got processed quickly around 1 minute ). If it gets something in the queue with the co-relation id then it returns the report back. If id does not receive anything within a minute, then it throws back a message to the user saying that the request is being submitted in background.
4. Mean while there is another MDB in background listening for messages from the same queue ( like Servlet in step 3). The idea is to have this MDB pickup response messages for which processing took longer than 1 minute.
This way the client will have a better experience in that for short report-requests he will get synchronous response
wheres as for longer requests he will be notified that the report is running in the background.
Pl let me know what is the best way to implement this scenario. Can I use distributed destinations and have one queue forward to another after a forward-delay of 1 minute.
Or can I use transactions to achieve this behaviour.
Your time is greatly appreciated
Thanks
Kiran Rajapur
-
JMS Queue config question ( Can distributed queue be used ? ) (4 messages)
- Posted by: Kiran Rajapur
- Posted on: March 23 2004 09:43 EST
Threaded Messages (4)
- JMS Queue config question ( Can distributed queue be used ? ) by sridhar r on March 23 2004 13:40 EST
- JMS Queue config question ( Can distributed queue be used ? ) by sridhar r on March 23 2004 13:40 EST
- JMS Queue config question ( Can distributed queue be used ? ) by Kiran Rajapur on March 24 2004 17:48 EST
- Same by Rachna Chadha on April 09 2004 16:27 EDT
-
JMS Queue config question ( Can distributed queue be used ? )[ Go to top ]
- Posted by: sridhar r
- Posted on: March 23 2004 13:40 EST
- in response to Kiran Rajapur
If this is for a real time development - I would recommend using any reporting software such as Actuate. It can easily provide you the status of scheduled reports running..You can invoke Actuate API to get the details and format in your front-end. -
JMS Queue config question ( Can distributed queue be used ? )[ Go to top ]
- Posted by: sridhar r
- Posted on: March 23 2004 13:40 EST
- in response to Kiran Rajapur
If this is for a real time development - I would recommend using any reporting software such as Actuate. It can easily provide you the status of scheduled reports running..You can invoke Actuate API to get the details and format in your front-end.
Thanks,
Sridhar -
JMS Queue config question ( Can distributed queue be used ? )[ Go to top ]
- Posted by: Kiran Rajapur
- Posted on: March 24 2004 17:48 EST
- in response to sridhar r
We are using Crystal Reports Server.
Not sure if Crystal Reports has the ability you are talking about. -
Same[ Go to top ]
- Posted by: Rachna Chadha
- Posted on: April 09 2004 16:27 EDT
- in response to Kiran Rajapur
I am doing the same thing. But we just trigger the process of stating reporting by sending message to MDB . Once it gets the message , it triggers a batch file outside the server. The batch file actaully starts a new java process and this process actaully makes reports. When done , it reports back to MDB , and MDB sends the reply back with status. It all works.
But , there is a overhead of starting a new JVM and triggering batch process from MDB. Initialization itself can take 20 seconds about, but I think if you use it for really big reports its negligible.
We have implemensted this in websphere and it all seems to perform well.
Let me know if you have questions.
RC