docker / libchan

Like Go channels over the network
Apache License 2.0
2.47k stars 142 forks source link

Add example using websockets #56

Open dmcgowan opened 9 years ago

dmcgowan commented 9 years ago

Add an example which demonstrates libchan being used over a websocket. Since the spdy protocol is separated from the transport, this should be possible to implement using the existing code.

Relevant to #5

AdrianRossouw commented 9 years ago

Just to point out to those who read this later:
libchan over websockets is different to libchan in the browser.

Having libchan implementations (say go to node, or go to go) connected to each other via websockets is probably possible today.

Unfortunately the browser is just too different right now for the latter, and the leading JS implementation (node-spdy) seems to have too much of an emphasis on the node part for this to be a completely straight forward port.

It should still be feasible though, but over at jschan we opted to just write a simple msgpack over websocket transport layer for now. Until we can spend the time to iron out the details.

We're also building out AetherBoard, a collaborative whiteboard tool, over this custom transport. It's our hope that when we get the client-side figured out, it will be possible to swap out the server side implementation entirely for this app.