whatwg / meta

Discussions and issues without a logical home
Creative Commons Zero v1.0 Universal
93 stars 161 forks source link

WebSocket standard creation proposal #202

Closed ricea closed 1 year ago

ricea commented 3 years ago

I would like to extract the WebSocket sections from the HTML and Fetch standards and combine them into a single standard. My major motivation for this is to create a place for the WebSocketStream standard to live, but this is not contingent on that. This work will reduce the number of places implementers have to look to implement WebSocket support, and so is beneficial even if WebSocketStream is ultimately not adopted.

I have a work in progress at https://github.com/ricea/websocket/blob/main/index.bs. This is the HTML WebSocket standard text converted to Bikeshed with the Fetch WebSocket parts pasted in front. The only significant change is that the send() method takes multiple types instead of being overloaded, which was necessary to make Bikeshed happy. I still need to convert the Fetch WebSocket parts to use Bikeshed Markdown, but it may be useful not to do that yet to make review easier.

I propose using the long name "WebSockets" or "The WebSocket standard", and the short name websockets to match the existing wpt directory name, but I am open to other ideas.

I propose myself as one editor of the standard. I am already an editor of the Streams Standard so I roughly know what I am doing. It would be good to have a co-editor from another browser, but I don't have a volunteer at present.

As well as the normal work of starting a new standard, we will have to create redirects from the HTML and Fetch standards to the new locations. This should be a small matter of JavaScript.

foolip commented 3 years ago

Sounds great!

This should stay in the HTML workstream, right? It would be the first time a workstream holds more than one standard, but that's OK!

I propose using the long name "WebSockets" or "The WebSocket standard", and the short name websockets to match the existing wpt directory name, but I am open to other ideas.

Agreed on the shortname. The name needs to make sense without a trailing "standard" since the specs say "Living Standard" just below the name. Since https://tools.ietf.org/html/rfc6455 is "The WebSocket Protocol" a sensible option might be "WebSocket API", similar to https://notifications.spec.whatwg.org/.

As well as the normal work of starting a new standard, we will have to create redirects from the HTML and Fetch standards to the new locations. This should be a small matter of JavaScript.

Redirecting all of the anchors should indeed be a matter of JavaScript. https://html.spec.whatwg.org/multipage/web-sockets.html as a whole might require server configuration, and if so I can help with that.

annevk commented 3 years ago

Workstream is HTML as per https://github.com/whatwg/sg/issues/97.

I suggest we redirect websocket.spec.whatwg.org since that's likely something people will get wrong all the time. Since it will also contain protocol details (there's many parts we've had to monkey patch now) I think WebSockets is slightly preferable as a name.

ricea commented 3 years ago

I really have no artistic ability. Can anyone create a logo? I'm thinking that an ethernet port might be good, but other ideas are welcome.

domenic commented 3 years ago

It seems like there's some sort of unofficial community logo already, but I can't figure out where it comes from and who might have copyright on it...

domenic commented 3 years ago

Oh, it looks like it probably originated from https://www.w3.org/html/logo/ . CC-BY-3.0! OK cool, let me try to whip something up... we'll want to include attribution in the acks section of the spec.

ricea commented 3 years ago

Oh, it looks like it probably originated from https://www.w3.org/html/logo/ . CC-BY-3.0! OK cool, let me try to whip something up... we'll want to include attribution in the acks section of the spec.

Okay, cool!

domenic commented 3 years ago

A few ideas. (Ignore the different background/border colors; I'm being lazy and screenshotting.)

One take:

Websocket protruding out of the circle

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="45" fill="#fff" stroke="#3c790a" stroke-width="10"/>
  <path fill="#3c790a" d="M 72.229 66.76 L 83.191 66.76 L 83.191 40.439 L 70.842 28.088 L 63.089 35.841 L 72.229 44.98 L 72.229 66.76 Z M 83.219 72.256 L 67.253 72.256 L 44.982 72.256 L 35.841 63.117 L 39.717 59.24 L 47.268 66.79 L 62.799 66.79 L 47.497 51.46 L 51.403 47.557 L 66.704 62.857 L 66.704 47.324 L 59.184 39.804 L 63.031 35.957 L 44.027 16.867 L 25.284 16.867 L 25.284 16.867 L 5.848 16.867 L 16.782 27.801 L 16.782 27.83 L 16.84 27.83 L 39.459 27.83 L 47.47 35.841 L 35.755 47.557 L 27.745 39.544 L 27.745 33.325 L 16.782 33.325 L 16.782 44.084 L 35.755 63.059 L 28.032 70.782 L 40.383 83.133 L 59.124 83.133 L 94.152 83.133 L 94.152 83.133 L 83.219 72.256 Z"/>
</svg>

Another, using

M 66.23 62.237 L 74.235 62.237 L 74.235 43.019 L 65.218 34.002 L 59.557 39.661 L 66.23 46.334 L 66.23 62.237 Z M 74.254 66.249 L 62.597 66.249 L 46.336 66.249 L 39.662 59.577 L 42.492 56.746 L 48.005 62.259 L 59.345 62.259 L 48.173 51.066 L 51.024 48.215 L 62.196 59.387 L 62.196 48.046 L 56.706 42.556 L 59.514 39.747 L 45.639 25.808 L 31.954 25.808 L 31.954 25.808 L 17.763 25.808 L 25.746 33.791 L 25.746 33.812 L 25.788 33.812 L 42.304 33.812 L 48.153 39.661 L 39.599 48.215 L 33.751 42.365 L 33.751 37.825 L 25.746 37.825 L 25.746 45.68 L 39.599 59.535 L 33.961 65.174 L 42.978 74.192 L 56.662 74.192 L 82.238 74.192 L 82.238 74.192 L 74.254 66.249 Z

WebSocket butting against circle

And a more traditional one, using

M 63.647 60.29 L 70.378 60.29 L 70.378 44.13 L 62.796 36.548 L 58.036 41.307 L 63.647 46.918 L 63.647 60.29 Z M 70.394 63.664 L 60.592 63.664 L 46.918 63.664 L 41.306 58.054 L 43.686 55.673 L 48.322 60.309 L 57.857 60.309 L 48.463 50.897 L 50.86 48.5 L 60.255 57.894 L 60.255 48.357 L 55.638 43.741 L 58 41.379 L 46.332 29.658 L 34.825 29.658 L 34.825 29.658 L 22.892 29.658 L 29.605 36.371 L 29.605 36.388 L 29.64 36.388 L 43.528 36.388 L 48.446 41.307 L 41.253 48.5 L 36.336 43.58 L 36.336 39.763 L 29.605 39.763 L 29.605 46.368 L 41.253 58.018 L 36.513 62.76 L 44.095 70.343 L 55.601 70.343 L 77.108 70.343 L 77.108 70.343 L 70.394 63.664 Z

WebSocket inside the circle with some padding

domenic commented 3 years ago

BTW if you want to play with it yourself you can use https://boxy-svg.com/, although it seems to be Chromium-only :-/. Normally I hand-edit my SVGs but figuring out how to keep the logo centered while scaling it is a bit annoying.

ricea commented 3 years ago

Scaled to 16x16 the middle one seems most legible:

  1. image
  2. image
  3. image

Although any of them could probably be tweaked a bit to improve clarity at small sizes.