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

Add way to instantiate microservices directly through Allocator without going through Proxy #67

Open
mwyzhao opened this issue Sep 21, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request testing

Comments

@mwyzhao
Copy link
Member

mwyzhao commented Sep 21, 2020

I call it service injection, just to have a cool name for it. Basically it'll be a side channel to manually create microservices instances attached to an Allocator. This will enable easier setup for more complex test cases without having to jump through a bunch of hoops.

Current thoughts is that it will be implemented as an HTTP server spun up alongside the allocator P2P node that will respond to commands such as create or possibly in the future kill.

  • Query the HTTP server with the desired command and the HTTP server will pass this off to the Allocator which will execute the command.
  • To keep this side channel as consistent as possible so we don't have two sets of similar code to worry about testing, the actual allocation will be done by sending a P2P allocation request from the Allocator back to the Allocator itself.
  • This can be enhanced for security by adding a PSK to the command to signal that it is a command sent from an "admin" that can be only run by someone who has privileged access to the Allocator.
@mwyzhao mwyzhao self-assigned this Sep 21, 2020
@mwyzhao mwyzhao added enhancement New feature or request testing labels Sep 21, 2020
@hivanco
Copy link
Member

hivanco commented Sep 23, 2020

It'd be good even for something like our demo covid tracker. I had to manually start the web server since you need something to request it for the allocator to allocate it, but no service sends requests the web server.

@mwyzhao
Copy link
Member Author

mwyzhao commented Sep 23, 2020

For that case can't you just curl the proxy with the name of the covid-19 tracker to boot up an instance?

@hivanco
Copy link
Member

hivanco commented Sep 27, 2020

I hadn't made the web server able to respond to p2p requests and was running its proxy in client mode, but yeah probably should have made it so that was possible.

@hivanco
Copy link
Member

hivanco commented Sep 27, 2020

Actually one caveat was I wanted to specifically run it on a machine where I had created a public facing IP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request testing
Projects
None yet
Development

No branches or pull requests

2 participants