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

Developer UX: Requiring SSL on first-time local setup sucks #5

Open
canadaduane opened this issue Jan 26, 2021 · 3 comments
Open

Developer UX: Requiring SSL on first-time local setup sucks #5

canadaduane opened this issue Jan 26, 2021 · 3 comments

Comments

@canadaduane
Copy link
Member

canadaduane commented Jan 26, 2021

In Braid, we depend on keep-alive streams to keep state up-to-date on the client. Unfortunately, however, HTTP1.1 supports a paltry 6 simultaneous streams. This means we are limited to 6 state resources on HTTP1.1 using the current spec.

Since HTTP2 supports multiplexing any number of streams, it's natural to reach for HTTP2 as the solution; however, HTTP2 requires SSL. Therefore, when running on localhost, HTTP2 adds an additional layer of friction to a first-time developer experimenting with Braid: they must install a self-signed certificate and click past the "scare screen" in the browser.

Possible solutions:

  • Limit first-time demo apps to 6 state resources
  • Braid over Websocket
  • Multiplex resources over single stream
  • others?
@canadaduane canadaduane changed the title Developer UX: Requiring SSL on first-time server setup sucks Developer UX: Requiring SSL on first-time local setup sucks Jan 26, 2021
@canadaduane
Copy link
Member Author

canadaduane commented Jan 26, 2021

Possible implementation for multiplexing over single stream: https://docs.microsoft.com/en-us/graph/json-batching

@canadaduane
Copy link
Member Author

Here's another possible solution:

  • Change notification events: If a client could be notified whenever any resource has changed, then that client could request a regular HTTP GET (i.e. not keep-alive) on the changed resource.

Pros:

  • compared to multiplexing, simpler implementation on the server side

Cons:

  • slower & more request overhead

@toomim
Copy link
Member

toomim commented Feb 25, 2021

I like the approach of adding a WebSocket fallback to use in local development, and @brynbellomy and I have been sketching a protocol for that here: https://braid.org/protocol/websocket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants