0

I'm trying to understand how an Google Apps Script deployment actually work, and my question has two parts:

  1. When an Apps Script is run as a web application, and multiple users access it using the same URL, do completely separate (container-like) instances get spawned in Google Servers per google.script.run call per user?
  2. If the answer is yes, are those instances visible to Google Cloud Admins of an organization?

In addition, any other information to understand how it actually work is also much appreciated. It is still kind of a black-box to me even after reading multiple docs and articles.

0

1 Answer 1

3

Each call to the Google Apps Script web app is handled by an independent execution.

An independent execution handles each call to Google Apps Script server-side functions using google.script.run.

Above, I'm using independent for emphasis purposes. From a language economy perspective, execution should be enough.

All Google Apps Script executions are logged in the Google Apps Script's project execution log, which can be seen by anyone with access to the Google Apps Script project and the related Google Cloud Platform project.

How organization admins might have access to the execution logs depends on several factors, including but not limited to the Google Workspace edition used by the organization.

Note:

If you are planning a web app, please be aware that there are limits to the number of simultaneous executions per user and per script. For details, see https://developers.google.com/apps-script/quotas.


Resources

Resources that mention stuff that might help to understand what is execution in Google Apps Scripts

  • The Apps Script Dashboard

    Extracts from the above link:

    Executions. The number of times a project has been "run" or executed. See Execution types for more information about how a project can be run.

    ...

    Manage executions

    ...

    The Type column shows what initiated the execution. Values include:

    • Add On. The execution originated from an add-on.
    • Execution API. The execution originated from an invocation of the Apps Script API.
    • Time Driven. The execution was caused by a time event.
    • Trigger. The execution originated from a trigger source.
    • Webapp. The execution originated from a deployed web app.
    • Editor. The execution originated from the Apps Script editor.
  • Logging From the above link:

    A basic approach to logging in Apps Script is to use the built-in execution log. To view these logs, at the top of the editor, click Execution log. When you run a function or use the debugger, the logs stream in real time.

  • Executing Apps Script Functions

Related

2
  • Thank you for your answer. Would you mind explaining a bit more on "separate execution"? For example, is it a completely different instance (E.g. a separate container or a process), or a thread in a process (E.g. similar to a web server). I'm trying to understand the level of separation and isolation.
    – drox
    Commented Jul 1 at 16:30
  • 1
    @drox I added a Resources section. If you still find the "execution" concept unclear in the context of Google Apps Script, please post a new question, clearly specifying a summary of the relevant parts of your background and your experience using Google Apps Script.
    – Wicket
    Commented Jul 1 at 18:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.