-
Notifications
You must be signed in to change notification settings - Fork 70
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
ILP over WebSockets #326
Comments
I'd recommend just using cookies. i.e. POST to a There's an old issue requesting that Auth headers can be added via the browser WS API, maybe add some support for it too? |
What's the advantage of using cookies over the |
The cookie flow Adrian described is much more common, but the |
Using that header is a hack. That header is intended for sub-protocol negotiation (which we should probably use since we're designing a sub-protocol) not for arbitrary data. |
Apologies if I'm not really understanding the reasons/implications for/of this. Sharing some experience from using BTP/STREAM. If you go down the path of making a replacement for BTP, it might be worth considering being able to use one socket for multiple Currently the Essentially this means you can't reuse a socket for even consecutive STREAM connections, let alone parallel. It's not a huge deal, but the Coil WM extension currently spawns new WebSockets every time it changes streaming context (i.e. focus tab to another WM page). You could debate how useful it would be in practice to be able to recycle sockets, but it would be nice to have the option. For example, it would be nice to be able to gracefully shutdown (maybe simply pause it for a configurable period before completely closing) a connection, while starting up another on context change. It looks like the batch-id from ilp-transport would get part of the way there, but the definition seems to imply that only one batch can be active at a time. |
Yep! This will enable you to use a single socket for ILP packets and multiple settlement engines (successor to plugins) simultaneously, for each peer. The rationale is this simplifies the framing, since we can just use ILP packets instead of BTP packets (ILP packets are used for framing settlement messages in ILP-over-HTTP, so this makes everything more consistent), and the auth is no longer weird & complex where the connection is opened, then dropped if the token isn't provided via a subprotocol.
We also had issues with this. We had to wrap the plugin in another plugin, overriding |
@kincaidoneil |
Based on the work done so far I've taken a stab at a new protocol definition: It's super-simple and designed to work via either WebSockets or QUIC. I need to do some experiments to ensure all assumptions hold but I don't think there is anything in there likely to be an issue. Next step is some basic client/server implementations and then migrations for BTP. Please log issues and PRs if you have suggestions or comments. |
I'm going to close this for now. If we want to pursue this in the future, I think it should be proposed in the RFCs first. |
@kincaidoneil requested supporting ILP-over-Websockets, along the lines of what @adrianhopebailie proposed in https://github.com/adrianhopebailie/ilp-transport. It shouldn't be too hard to support this. We would need to:
u32
good enough?)/websocket
,/ws
/,/ilp/websocket
,/ilp/ws
, or something elseSec-Websocket-Protocol
header as suggested here, which is apparently supported by the browser's WebSocket API) in addition to normal HTTP auth headers for other clientswarp
filter for the server side (very easy)The text was updated successfully, but these errors were encountered: