★ I built a shared pixel canvas with Laravel Rust 0 ▲ freek.dev 57 minutes ago · Tech · hide After moving this blog to Laravel Rust, I wanted to try something I wouldn't build the same way in a typical Laravel PHP app. So I built Dots, a shared pixel canvas. It uses a few techniques that aren't possible in a traditional PHP request/response app. Dots started out as something closer to Reddit's r/place: place a pixel, wait a few seconds, place another one. I soon wanted to just draw, so I removed the cooldown and added freehand drawing and a line tool. Everyone shares the same 500 × 500 canvas and 16 colors. You can zoom in to work on individual pixels, or zoom out and draw across the board. Keeping the canvas in memory In a Laravel PHP app running under PHP-FPM, I can't keep a single canvas in ordinary application memory and share it between requests. I'd normally store the drawing in Redis or a database and use a WebSocket server to send updates. PHP can run long-lived apps too, for example with Octane, but that's a different setup from the usual PHP-FPM request lifecycle.… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town