Running a task every 30 seconds

Hi

I have to show on WEB, information retrieved from another web site (XML datas). As I don’t want that each anonymous user establish a real time connection to the remote server, I will retrieve these datas for all web users and save them on the server.

these informations MUST be refreshed every 30 seconds. I have several ideas that I want to share with you :

scenario one : my web page display information from a Document A

a) connection to the remote server using a classic java program running on the server

b) connection to Domino using iiop and refresh of a target document A

c) sleep for 30 seconds

scenario two :

a) a JAVA agent starts with the webQueryOpen event and look the last refresh date of the document A

b) if doc A is older than 30 sec, the remote datas are retrieved and saved in doc A

three

an add-in task but this is too risky

four

a document with a cachevalid field

ps1 : I cannot use any activeX, example : var xmlDoc=new ActiveXObject(“Microsoft.XMLDOM”)

ps2 : classic agent scenario is not possible as agents run every 5 minutes

Subject: Running a task every 30 seconds

Your message doesn’t make it clear what question you’re asking. If I’m guessing right, you want to know whether scenario one or two, or some other solution you haven’t thought of, is the best way to handle what you’re doing.

For me, I’d do your second scenario.

Subject: RE: Running a task every 30 seconds

yes you’re right. I wanted new ideas.

for the moment I have choosen the scenario one or the four.

can you explain why you prefere the second scenario.

I don’t like the second scenario because I have to deal with the concurrent accesses and I don’t want to have an agent which is launched 500 times a day.

thanks

ps : I added two other scenarios