What is the basic difference between xdmp:spawn and xdmp:invoke a function in Marklogic.
Aha..... Before understanding xdmp:spawn-function and xdmp:invoke-function in Marklogic, we need to understand synchronous & asynchronous terms. Also, we need to know what is the main server, task server, and Transactions in the Marklogic. So I'm posting here the simple definition of each term that I mentioned here. Synchronous and Asynchronous Task: Synchronous : In synchronous operations tasks are performed one at a time and you can't move the following task until the current task is finished. Asynchronous : In asynchronous operations, you can move to another task before the previous one finishes. Main Server : Task server: Transactions: Now, We need to know what asynchronous functions & asynchronous functions in Marklogic are: Asynchronous Functions: xdmp:spawn : Place the specified module/query on the task queue for evaluation. This function places the specified module in the task queue to be processed. The module will be eva...