Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert js_generic to a collection of endpoints, a.k.a. dynamic endpoints #1460

Open
achamayou opened this issue Jul 29, 2020 · 0 comments
Open
Assignees
Labels

Comments

@achamayou
Copy link
Member

@achamayou achamayou commented Jul 29, 2020

The js_generic app is currently defined as a single endpoint as far as CCF is concerned. This is expedient, but comes with a number of limitations, in particular:

  1. Since that endpoint is defined as Read/Write, to enable all use cases, all requests must be forwarded to the primary, leaving the followers unable to service read-only requests.
  2. Although the /api does currently list js-defined endpoints through delegation, the effort to expose an OpenAPI schema will need to be duplicated.
  3. Any change to a handler means the whole app must be re-submitted as a new proposal.
  4. A Javascript-native single app container would almost inevitably expose a top-level scope, which is an undesirable pitfall (CCF's design mandates that the KV serves as the global scope).

Instead of building application runtimes as a single endpoint, we want instead the ability to dynamically register/de-register endpoints, which can be implemented in potentially different scripting languages, although CCF will ship with Javascript support for now. This registration should make use of the same API as the native C++ endpoints, and offer the same capabilities in terms of forwarding, authentication, api schema generation etc.

@achamayou achamayou added this to the JS support in CCF milestone Jul 29, 2020
@achamayou achamayou changed the title Convert js_generic to a collection of endpoints Convert js_generic to a collection of endpoints, a.k.a. dynamic endpoints Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.