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

Zero-overhead native Go support #543

Open
tj opened this issue Jan 16, 2018 · 4 comments
Open

Zero-overhead native Go support #543

tj opened this issue Jan 16, 2018 · 4 comments

Comments

@tj
Copy link
Member

@tj tj commented Jan 16, 2018

Currently there's a local proxy Up Proxy -> Your App, however with native Go we could now let you run native Go apps without the proxy, by embedding it, something like:

func main() {
  up.Handle(h)
}

Honestly I think the latency benefits would be negligible, but it's worth investigating. Another benefit would be that you can shave ~3mb off your deploy size (and time).

TL;DR this keeps all of the Up proxy features, with none of the overhead.

  • remove Runtime? decide how to signal native support
  • add nicer public interface to "github.com/apex/up/platform/lambda/proxy/golang"
  • add config to opt-in and/or detect (too much magic probably haha)
  • add examples
  • ensure shim is still used by default
  • ensure up start respects this
  • QA
  • docs (mention missing relay features for logs etc)
@tj tj added this to the 0.5.0 milestone Jan 16, 2018
@tj tj mentioned this issue Jan 17, 2018
4 of 7 tasks complete
@tj tj removed this from the 0.5.0 milestone Jan 17, 2018
@franciscocpg

This comment has been minimized.

Copy link
Contributor

@franciscocpg franciscocpg commented Jan 19, 2018

Maybe this could help somehow?
https://github.com/akrylysov/algnhsa

@tj

This comment has been minimized.

Copy link
Member Author

@tj tj commented Jan 19, 2018

@franciscocpg https://github.com/apex/gateway — looks similar haha. Honestly it's not a big win over using the shim. I'd still like to add it, but it's not a huge priority.

@franciscocpg

This comment has been minimized.

Copy link
Contributor

@franciscocpg franciscocpg commented Jan 19, 2018

ops, didn't know it 🙌

@tshak

This comment has been minimized.

Copy link

@tshak tshak commented Mar 7, 2018

Unless there's something incredibly wrong with how I've implemented golang support, the differences are not significant. https://gist.github.com/tshak/7fa2c7803ae5a27f66441752d1bd8e45

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
3 participants
You can’t perform that action at this time.