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

Implement the built-in "extras" provider #15

Closed
autodidaddict opened this issue Jun 3, 2021 · 2 comments · Fixed by #139
Closed

Implement the built-in "extras" provider #15

autodidaddict opened this issue Jun 3, 2021 · 2 comments · Fixed by #139
Assignees
Labels
status quo Issues containing work to maintain feature parity with the existing version

Comments

@autodidaddict
Copy link
Member

autodidaddict commented Jun 3, 2021

There's a subtle, but important point with this one. If we implement the extras provider as a standard subscriber to NATS topics, then we'll basically have one extras provider per host, and they'll each respond to all of the requests of the extras provider.

On the other hand, if the extras provider subscribes as a queue subscriber to the specific subject for it, and registers itself during startup, then an extras provider will be randomly chosen from among the hosts in the lattice. Given the way NATS works, we can at least guarantee that the one chosen will be in an optimal path, but will never be local.

In short, the extras provider will incur a network latency penalty just as if it were a "regular" capability provider that was registered and managed externally.

Another alternative is to monitor the namespace and operation for each invocation, and if we see the extras provider, then we can defer those specific invocations to a custom provider.

I prefer the former, where we create a provider that's queue subscribed to the appropriate topic. This will ensure that all provider invocations go through the same code path and we don't end up with all kinds of one-off conditional branches like we had with Actix and the version before it.

@autodidaddict autodidaddict added the status quo Issues containing work to maintain feature parity with the existing version label Jun 3, 2021
@autodidaddict autodidaddict added this to In progress in wasmCloud OTP RC0 Jun 17, 2021
@autodidaddict autodidaddict moved this from In progress to To do in wasmCloud OTP RC0 Jun 25, 2021
@autodidaddict autodidaddict removed this from To do in wasmCloud OTP RC0 Jul 15, 2021
@autodidaddict autodidaddict self-assigned this Jul 15, 2021
@stevelr
Copy link
Contributor

stevelr commented Jul 17, 2021

depends on issue #114

@autodidaddict
Copy link
Member Author

Per multiple discussions, we are removing the sequence number generation because of its local nature potentially causing unintended problems as actors scale horizontally (each host would produce its own sequences with potential overlap).

Additionally, we've also decided to rename this contract ID to wasmcloud:builtin:numbergen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status quo Issues containing work to maintain feature parity with the existing version
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants