Concurrency
An Aplicación Arbortext PE does not need to be thread-safe. An Subproceso de Arbortext PE only handles one request at a time; therefore, it can only run one Aplicación Arbortext PE at a time. However, an Aplicación Arbortext PE does need to be safe for multi-processing, because the Arbortext PE Request Manager could ask two or more Subprocesos de Arbortext PE to run the same Aplicación Arbortext PE at the same time.
For example, if an Aplicación Arbortext PE attempts to write temporary data using an absolute path and file name (e:\tempdata\tempdatafile.txt), two instances of the Aplicación Arbortext PE might run at the same time and overwrite each other’s file. If an Aplicación Arbortext PE stores data to the Windows clipboard, two instances of the operation might run simultaneously and interfere with each other.
Every Aplicación Arbortext PE needs to be serially reusable. An Aplicación Arbortext PE should not attempt to maintain any state from one call to the next. The Arbortext PE Request Manager could ask a particular Subproceso de Arbortext PE to execute any Aplicación Arbortext PE repeatedly, so the Aplicación Arbortext PE must not assume any prior state each time it is invoked. If a particular client submits several Aplicación Arbortext PE requests to an Servidor de Arbortext PE, the Arbortext PE Request Manager might allocate a different Subproceso de Arbortext PE to serve each request. If the second request expects to find information left behind by the first request (for example, a value stored in a global variable), the application would only work if the Arbortext PE Request Manager happened to allocate the same Subproceso de Arbortext PE to serve both requests.
Parent topic