Dears,
Question:
What is the best (the quickest/most optimized) way to retrieve documents (in my case appointment documents) from 3 different servers (each ~1000 km away)?
Problem:
It’s not a problem for me to collect all the appointments from the server on the site my script is sitting on (~30s). But once I access remote servers, the agent takes ages. I think, the reason is, that my Notes client is still involved in the process causing the data/commands travel between sites making the script very inefficient.
Additional requirement:
I want to make changes to all documents retrieved in my ‘main’ agent.
Possible solution:
I was thinking to execute following scenario:
-
Menu agent will be triggered
-
Menu agent will call other agent (agent ‘A’) on 1’st (main) server. All docs will be collected
-
Menu agent will call the same agent (agent ‘A’) on 2’nd server and docs will be collected
-
Databases will be replicated (using this step, I will have all documents on main server available)
-
Menu agent will call the same agent (agent ‘A’) on 3’th server, docs will be collected
-
Databases will be replicated (after this, all documents will be available on main server, so the ‘MENU’ agent can process all documents)
At the end, the MENU agent will be a scheduled agent.
Is this a good approach? Are there better ideas? I am sure, that this is a common task, which is being dealed with commonly.
Thx,
Juraj
Subject: Remote document retrieval
Why not let repliacation gather the documents and redistribute them after the updates are done.
You can set up formula based replication if required.
Subject: RE: Remote document retrieval
I am not sure, what do you mean …
However, my idea is to have 1 agent, which will control the whole process (in this way, i know once the agent runs the end of code, everything has been completed)
I don’t want to relay on several independed agents running on each server separatelly collecting data from user mail db’s …
Again, I need to retrieve documents from mail db’s from different servers. I don’t understand, how the thing you wrote could be helpful for me …
Could you please be more descriptive?
Subject: RE: Remote document retrieval
Much depends on the details of the task, which you haven’t told us.
You could use RunOnServer method to run your agents on the servers that contain the data, and this would probably be considerably faster. However, this is no more reliable nor efficient, than just having a replica of the database that collects the statistics on each server, and having the agents run periodically to process the databases on their own servers, and letting them replicate with each other on a normal schedule. And, it requires less special access to do, and doesn’t tie up your workstation while it runs. I’m not sure how RunOnServer works for a scheduled agent on one server to call an agent on another server.
Subject: RE: Remote document retrieval
Hi Andre,
I am building a group calendar application (with some custom features). Reading appointments from users mail databases and creating new documents in my group calendar …
I already tried to use the RunOnServer method, but it generated following error message for me:
Unhandled error: 4000 - Notes error: Unknown LotusScript Error. @line: 30
'get the name of database
Set calendarDb = New NotesDatabase(“”,“”)
If Not calendarDb.Open(server,“GDM templates\gdm_group_calendar_dev.nsf”) Then
Error 1000, " GDM Group calendar database doesn’t exist on the server."
Else
Set retrAgent = CalendarDb.GetAgent(“ag_RetrieveAppointments”)
Call retrAgent.RunOnServer ← this line generates the error.
EndIf
I will have a deeper look to the error now. Reading the forum, I fould only following related post: http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/641875f5214fa7498525700d0072bf6b?OpenDocument, which is not very promisful.
Juraj