An application module is a piece of procedure logic defined on [[Invantive Cloud/Invantive Cloud|Invantive Cloud]] through the "Applications" form. It holds Invantive UniversalSQL and Invantive PSQL, runs against the database it is bound to, and returns what it writes to the response. ## Calling a Module A module has a hyperlink of its own. Opening that hyperlink runs the module, which makes anything able to fetch a URL able to drive it: a browser, a scheduler, a pipeline in another product, or a line in a batch file. The hyperlink is offered on the module in Invantive Cloud with "Copy Link". Where that is not available, the address follows the fixed shape of an App Online address, in which the segment naming the database is the same segment which appears in `itgenboe679`; see [[Invantive App Online/Enabling a Database|Enabling a Database]]. Because the call is a plain HTTP request, the response is the output of the module. A module can therefore serve a file: a report as XLSX, a list as CSV, or an answer as JSON built from a query. ## Authentication Next to the ordinary log on, App Online accepts a restriction on the calling IP address combined with a user name and a password. That is what makes an unattended caller practical: a scheduler which cannot perform an interactive log on can still be given access, and the address restriction limits what a leaked password is worth. ## Scheduling Any scheduler which fetches a URL can run a module: the built-in scheduler of an operating system, a pipeline in a data platform, or a monitoring tool. Where the scheduler records the response, it also records what the module reported, which is the cheapest form of logging available. Moving the work into the module rather than into the scheduler is usually the cheaper design. A pipeline which copies a table row by row is billed for every step it takes; a module which performs the same copy in one statement is one call. ## Duration Design a module to finish well within an hour and to be restartable. App Online sets no maximum duration of its own, but a request running for hours can be interrupted by an upgrade of the service, and a module which cannot be restarted then leaves work half done. Where a module has to process a large volume, split it by period, by company or by table and call it repeatedly rather than once.