pine-vm/pine

Simplify app development with dedicated API for tasks not depending on volatile process state

Opened this issue · 0 comments

Viir commented

So far, we always use volatile processes to run tasks integrating other software.
However, in many cases, we don't need the facilities to retain volatile process state beyond a single task. Examples are usages of elm-format and elm make in Elm Editor.

A dedicated API for a single task would simplify application developers' implementation. For example, this part should be simpler (And more complete, forwarding any errors that were not linked to RequestToVolatileProcess):

Err Platform.WebService.ProcessNotFound ->
( httpResponseInternalServerError
("Error: Volatile process '"
++ pendingTask.volatileProcessId
++ "' disappeared. Starting volatile process again... Please retry."
)
, Just pendingTask.volatileProcessId
)