#Websockets
11 notas · última:
How to Build a Collaborative Editor with Next.js and Liveblocks
The guide explains how collaborative editors work, why WebSockets matter, and how Liveblocks simplifies presence, syncing, and room management in a Next.js text editor.
Building a Ride Sharing App with Elixir and Phoenix Channels — Part 2
The tutorial moves from authentication to the app’s main feature: real-time matching between drivers and riders. It introduces Phoenix Channels, sockets, websockets, and topic-based message routing.
Stateless vs stateful web apps
The post contrasts stateless HTTP with stateful WebSocket apps, arguing that stateful systems demand long-lived connections, careful concurrency, and efficient broadcast handling to keep latency and costs down.
WebSockets, caution required!
The article argues that WebSockets are an implementation detail, not a feature, and that most realtime web apps need reliable client updates more than a new server backchannel.
Arduino Node.js RC Car Driven with the HTML5 Gamepad API
The post shows how a browser gamepad can feed steering and pedal data to a Node.js server, which relays it through WebSockets and serial output to an Arduino-driven RC car.
Phoenix & WebSockets
The thread says Phoenix could not support raw WebSockets directly at the time, because its websocket support for Channels was tied to a private Cowboy API. The recommended path was Plug dispatch options with a raw Cowboy websocket handler.
Cross-Site WebSocket Hijacking (CSWSH)
The article describes how WebSocket handshakes can carry cookies or HTTP authentication cross-site, allowing an attacker to open an authenticated connection, read data, and send messages unless the server checks Origin or uses tokens.
Tutorial: Build your own Google TV Using RaspberryPi, NodeJS and Socket.io
The tutorial shows how to build a proof-of-concept Google TV with Raspberry Pi, Raspbian, Node.js, Socket.io, Chromium, YouTube-dl, and OMXPlayer, then connect a remote and screen through WebSockets.
WebSockets in Ruby
The post describes moving a geocoding service in Ruby from HTTP to WebSockets, compares Ruby WebSocket options, and settles on webmachine-ruby with Celluloid actors for per-client CPU-heavy work.
WebSockets in Rails 4
The post explains how Rails 4 concurrency and Rack Hijack make WebSockets practical in Rails controllers, and introduces Tubesock as a small gem that wraps this approach.
Making a Collaborative Piano Using Functional Reactive Programming (FRP)
The post explains FRP through a collaborative piano built in CoffeeScript, where clicks, keypresses, and WebSocket messages are merged into one event flow and mirrored across clients.
