[HN Gopher] Web Streams at the Edge
___________________________________________________________________
Web Streams at the Edge
Author : 0xedb
Score : 92 points
Date : 2021-11-30 13:21 UTC (9 hours ago)
(HTM) web link (deno.com)
(TXT) w3m dump (deno.com)
| udia wrote:
| Nice to have a new offering for edge compute/streams! It would be
| useful to see how this compares with the different edge compute
| alternatives (particularly Cloudflare Workers/Durable Objects) in
| terms of TCP Connection Time, Time To First Byte, Time To Last
| Byte, etc.
| eyelidlessness wrote:
| The SSE example hangs indefinitely on mobile Safari, rendering
| fully all events that were sent only after canceling load.
| According to caniuse this shouldn't be a compatibility issue, so
| something else might be wrong.
|
| I'm not sure what to expect from the websocket example, but I
| just see "request isn't trying to upgrade to websocket."
| olah_1 wrote:
| I was naturally wondering what some use cases of this would be.
| Anyone have ideas?
| tmikaeld wrote:
| You could:
|
| - Stream-process JSONL.
|
| - Replace strings for translations while streaming.
|
| - Stream Video.
|
| I guess you don't mean WebSockets, since that has a myriad of
| use-cases, everything from chats, games, charts, feeds etc.
| eyelidlessness wrote:
| Streaming in particular can provide a huge performance boost
| for server-side rendered pages. In theory, server-sent events
| can also provide performance benefits (both in page weight and
| runtime) by moving more dynamic behavior from the client to the
| server.
| Kinrany wrote:
| You could run trusted game server proxies. In FPS games this
| would help with the latency vs cheating trade-off.
|
| 1. An enemy is hiding behind a corner. The player takes a step
| and sees the enemy.
|
| If the client knew the enemy was there, the player could cheat.
| If the client didn't know, the player would see the enemy with
| a delay. The proxy can share the hidden state at exactly the
| right moment.
|
| 2. When the player thinks that their shot hit the target, but
| the central server disagrees.
|
| If the client is trusted to determine the answer, the player
| could cheat again. If the client isn't trusted, the player
| would sometimes see a hit that didn't harm the target. The
| proxy can make the decision and provide accurate feedback
| immediately.
| plopz wrote:
| This seems like its http and web sockets, so probably not
| useful for game networking until HTTP/3 and WebTransport
| happens so that UDP becomes possible.
| WorldMaker wrote:
| If a game doesn't want TCP at all for whatever performance
| metrics they think they need to hit in their networking
| stack, HTTP/3 is not likely to meet their
| needs/standards/expectations either even over UDP because
| HTTP/3 just moves some of TCP's stack into the application
| protocol over top of UDP and in some ways remains "just" a
| TCP-over-UDP tunnel.
| plopz wrote:
| Could you elaborate? I'm not sure I understand. The main
| issue that UDP solves in game networking is being able to
| send/receive out-of-order messages, which will be
| possible with WebTransport datagrams.
___________________________________________________________________
(page generated 2021-11-30 23:02 UTC)