Skip to content
This repository has been archived by the owner on Mar 13, 2021. It is now read-only.

Implement gRPC for node #12

Closed
scothis opened this issue Jan 23, 2018 · 0 comments
Closed

Implement gRPC for node #12

scothis opened this issue Jan 23, 2018 · 0 comments
Assignees
Projects

Comments

@scothis
Copy link
Member

scothis commented Jan 23, 2018

The node function invoker currently only supports request/reply semantics via the HTTP interface. With gRPC we can explore streaming bi-directional messages.

@scothis scothis self-assigned this Jan 23, 2018
@jldec jldec changed the title Investigate gRPC Investigate gRPC for node Jan 26, 2018
@jldec jldec changed the title Investigate gRPC for node Implement gRPC for node Jan 26, 2018
scothis added a commit to scothis/node-function-invoker that referenced this issue Feb 1, 2018
Implements a gRPC server for the riff MessageFunction service.

- Dynamically loads function.proto to create the service rather than
  using statically generated code. In tests, load time is twice as fast
  using dynamic loading and offers plain JS type support.
- Looks for 'Content-Type' and 'Accept' headers for content negotiation
  supporting: text/plain, application/octet-stream and application/json
- Maintains compatibility with functions invocable via HTTP

While streaming can be added in the future, all invocations are assumed
to be request-reply for now.

Issue: projectriff#12
scothis added a commit to scothis/node-function-invoker that referenced this issue Feb 1, 2018
Implements a gRPC server for the riff MessageFunction service.

- Dynamically loads function.proto to create the service rather than
  using statically generated code. In tests, load time is twice as fast
  using dynamic loading and offers plain JS type support.
- Looks for `Content-Type` and `Accept` headers (case sensitive) to
  support content negotiation supporting:
  - `text/plain`
  - `application/octet-stream`
  - `application/json`
- Maintains compatibility with functions invocable via HTTP

The `error` message header indicates when an invocation failed.
Errors are either client or server errors. Client errors can often
be resovled by using a different Content-Type or Accept header value.

The following error codes are used:
- `error-server-function-invocation`:
  The function being invoked threw an error
- `error-client-content-type-unsupported`:
  The message's Content-Type is not supported
- `error-client-accept-type-unsupported`:
  The server is unable to satisfy the client's acceptable types
- `error-client-unmarshall`:
  An error occured while unmarshall the input message's payload. For
  example, invalid JSON.
- `error-client-marshall`:
  An error occured while marshalling the output message's payload. For
  example, JSON stringifying cyclical object.

While streaming can be added in the future, all invocations are assumed
to be request-reply for now.

Issue: projectriff#12
scothis added a commit to scothis/node-function-invoker that referenced this issue Feb 1, 2018
Implements a gRPC server for the riff MessageFunction service.

- Dynamically loads function.proto to create the service rather than
  using statically generated code. In tests, load time is twice as fast
  using dynamic loading and offers plain JS type support.
- Looks for `Content-Type` and `Accept` headers (case sensitive) to
  support content negotiation supporting:
  - `text/plain`
  - `application/octet-stream`
  - `application/json`
- Maintains compatibility with functions invocable via HTTP

The `error` message header indicates when an invocation failed.
Errors are either client or server errors. Client errors can often
be resovled by using a different Content-Type or Accept header value.

The following error codes are used:
- `error-server-function-invocation`:
  The function being invoked threw an error
- `error-client-content-type-unsupported`:
  The message's Content-Type is not supported
- `error-client-accept-type-unsupported`:
  The server is unable to satisfy the client's acceptable types
- `error-client-unmarshall`:
  An error occured while unmarshall the input message's payload. For
  example, invalid JSON.
- `error-client-marshall`:
  An error occured while marshalling the output message's payload. For
  example, JSON stringifying object cycles.

While streaming can be added in the future, all invocations are assumed
to be request-reply for now.

Issue: projectriff#12
scothis added a commit to scothis/node-function-invoker that referenced this issue Feb 1, 2018
Implements a gRPC server for the riff MessageFunction service.

- Dynamically loads function.proto to create the service rather than
  using statically generated code. In tests, load time is twice as fast
  using dynamic loading and offers plain JS type support.
- Looks for `Content-Type` and `Accept` headers (case sensitive) to
  support content negotiation supporting:
  - `text/plain`
  - `application/octet-stream`
  - `application/json`
- Maintains compatibility with functions invocable via HTTP

The `error` message header indicates when an invocation failed.
Errors are either client or server errors. Client errors can often
be resovled by using a different Content-Type or Accept header value.

The following error codes are used:
- `error-server-function-invocation`:
  The function being invoked threw an error
- `error-client-content-type-unsupported`:
  The message's Content-Type is not supported
- `error-client-accept-type-unsupported`:
  The server is unable to satisfy the client's acceptable types
- `error-client-unmarshall`:
  An error occured while unmarshall the input message's payload. For
  example, invalid JSON.
- `error-client-marshall`:
  An error occured while marshalling the output message's payload. For
  example, JSON stringifying object cycles.

While streaming can be added in the future, all invocations are assumed
to be request-reply for now.

Issue: projectriff#12
scothis added a commit to scothis/node-function-invoker that referenced this issue Feb 5, 2018
Implements a gRPC server for the riff MessageFunction service.

- Dynamically loads function.proto to create the service rather than
  using statically generated code. In tests, load time is twice as fast
  using dynamic loading and offers plain JS type support.
- Looks for `Content-Type` and `Accept` headers (case sensitive) to
  support content negotiation supporting:
  - `text/plain`
  - `application/octet-stream`
  - `application/json`
- Maintains compatibility with functions invocable via HTTP

The `error` message header indicates when an invocation failed.
Errors are either client or server errors. Client errors can often
be resovled by using a different Content-Type or Accept header value.

The following error codes are used:
- `error-server-function-invocation`:
  The function being invoked threw an error
- `error-client-content-type-unsupported`:
  The message's Content-Type is not supported
- `error-client-accept-type-unsupported`:
  The server is unable to satisfy the client's acceptable types
- `error-client-unmarshall`:
  An error occured while unmarshall the input message's payload. For
  example, invalid JSON.
- `error-client-marshall`:
  An error occured while marshalling the output message's payload. For
  example, JSON stringifying object cycles.

While streaming can be added in the future, all invocations are assumed
to be request-reply for now.

Issue: projectriff#12
@scothis scothis added this to Done in invokers Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
invokers
  
Done
Development

No branches or pull requests

1 participant