GVMInvocationBindings
GraalVM: Invocation bindings.
Abstract base implementation of InvocationBindings based on GraalVM guest values (GuestValue). Guest invocation bindings describe methods for invoking guest code from Elide. Invocation bindings are specialized per-language, but generally map to a uniform set of "dispatch modes;" these modes describe, in basic language-agnostic form, how guest code should be called.
Dispatch modes
Dispatch modes supported on GraalVM are enumerated in DispatchStyle, and, at the time of this writing, include:
DispatchStyle.UNARY: Basic dispatch with one set of inputs and one output. In this mode, the guest VM executes in what amounts to be a "function." No output is available until the guest execution terminates.
DispatchStyle.SERVER: Dispatch of HTTP requests to the guest. Each HTTP request results in an invocation of the guest code. In this mode, the guest VM is entirely "in charge" of the request and response lifecycle. The server interface is wire-compatible with CloudFlare Workers.
DispatchStyle.RENDER: Sidecar dispatch of SSR render code, which is designed to operate in tandem with another guest or the host application. In this mode, the primary output is effectively a big string (although it may be streamed in chunks). In this mode, the guest VM is charged with rendering output based on input, but is not ultimately authoritative over the response or the request lifecycle.