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 websocket server #15

Open
andrewjaykeller opened this issue Jun 20, 2017 · 9 comments
Open

Add websocket server #15

andrewjaykeller opened this issue Jun 20, 2017 · 9 comments

Comments

@andrewjaykeller
Copy link

Good way to stream JSON to web browser!

Checkout this project: https://github.com/AdySan/ESPSocket/blob/master/ESPSocket/ESPSocket.ino

@andrewjaykeller
Copy link
Author

Socket.io client https://gist.github.com/alexcastillo/e3aca7ba0a3510a4c340b34faeb6d54c

Wensockets use TCP so this could be a good thing to implement the transfer protocol in because of the minimum framing websockets use for streaming. Seems better then raw TCP to be frank. TCP in its raw form fragments packers like crazy and not having a header, a minimum one, is a headache for developers.

@stevenaldinger
Copy link

GRPC (TCP only right now) might be worth exploring for you too. I want to say for what you're doing that'll work smoother. There's more documentation/maturity with websockets.

@andrewjaykeller
Copy link
Author

andrewjaykeller commented Nov 23, 2017

Is this GRPC? Link?

@stevenaldinger
Copy link

stevenaldinger commented Nov 23, 2017

Yeah and I take that back already, just realized you're going to browsers (vs just bidirectional stream)

@andrewjaykeller
Copy link
Author

andrewjaykeller commented Nov 23, 2017

We can go to node, python, Java, anything, does this run on ESP8266?

@stevenaldinger
Copy link

I don't see why it wouldn't. I've got a mature node client if you do, hit me up. GRPC works like databases a little where you depending on what you're doing you might want a connection pool. I use it on an API server and treating it like REST will def break things. :D

@stevenaldinger
Copy link

remember the first time we saw promises and were like what the shit is this? :D

@stevenaldinger
Copy link

FYI, I knew drone.io switched from websockets to grpc but didn't know why. Donno what half of this means but might be useful to you :P

replaced websockets with server sent events because http/2 does not support websockets, and version 0.8 begins taking advantage of http/2 connections for grpc and includes experimental quic support.

harness/harness#2159

@mickmister
Copy link

Is this ticket still valid? I will look into working on it if so

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

No branches or pull requests

3 participants