this post was submitted on 13 Nov 2026
1 points (100.0% liked)

Web Development

5954 readers
8 users here now

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

Related Communities

Wormhole

Some webdev blogsNot sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

CreditsIcon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] ultimaluz@lemmy.world 1 points 57 minutes ago

nice, the "draw from your phone and see it at home" thing is pretty much the same problem I have with a small shared pixel canvas game I run, so on your open questions this is what ended up working for me. I didn't go websocket, it's SSE for server to client and a plain POST for every action, the POST response is kind of the "rpc return" and the change goes out to everyone else through the SSE stream. conflicts were a non issue because it's one node process with the state in memory, two clicks on the same cell just apply in order and last one wins, the only place I needed a real check was undo (it answers 409 if someone touched the cell after you). for reconnects I don't try to replay what you missed, EventSource reconnects by itself and on reopen the client just fetches the whole canvas again, it's small enough that it's cheaper than being clever about it. curious if the phone going to sleep gave you trouble with the websocket