We have designed a contact/calendar/tasks sync from Domino to a CRM app using Java based Agents running in the server. Now we are going to one Agent that runs multiple threads accessing multiple mailboxes to do the synchronization on periodic basis.
There is this other option of Server Add In Task. But this uses C APIs or C++ APIs.
a) What are the Pros and Cons of Server Add In Task vs Java based agents?
b) There is a concern that most efficient is Server Add in Task since it is not limited by the Agent Manager. Also Java agent in turn uses C API, so using C Apis directly is more efficient. Are these correct?
The java api is easier to program with. Its object model makes sense to the form of data as it exists in Domino.
That being said, you raise some good points.
a) What are the Pros and Cons of Server Add In Task vs Java based agents? There is a maximum amount of time that agents are usually allowed to run. This is configured on the server document (under Max LotusScript/Java execution time) for a given server. I do not know how complex your synchronization code is. You mention one agent running multiple threads. If it is intended to handle a lot of data across a lot of databases, you may need to run longer than the default here allows. If you allow your agents to run too long, then the agent manager queue could back up - delaying other vital agents from running.
A server add in task will not have run time limits like this, but it will probably take longer to code the add in task to meet your needs. I would expect the CAPI server add in to run faster than the java agent. If the amount of data is great, then this may be your deciding factor. If the amount of data will be less than a lot, then perhaps the java agent will meet your needs.
Having a really good test environment to see how everything will perform - meaning real amounts of data on both sides and the ability to change that data at a real world pace - should give you the info that you need to decide.
b) There is a concern that most efficient is Server Add in Task since it is not limited by the Agent Manager. Also Java agent in turn uses C API, so using C Apis directly is more efficient. Are these correct?
Any agent shares the agent manager with all other agents that need to run on the server. That being said, the agent manager is pretty efficient. It can be configured to handle more agents at once, should you have that need.
You are correct that the Java api calls the CAPI. That does not mean that the CAPI server addin will always be faster. The java api, particularly with collection operations, has a nice cache that it uses to help things be very fast. We have a done a lot of work with this for 8.5 and the upcoming 8.5.1 release, and we will continue that work in 8.5.2.