[{"data":1,"prerenderedAt":82},["ShallowReactive",2],{"api:\u002Fapi\u002Fconfig:en":3,"api:\u002Fapi\u002Fnotes:en":8,"api:\u002Fapi\u002Fprojects\u002Frealtime-rooms:en":32},{"email":4,"lang":5,"name":6,"role":7},"hello@ewsirdev.example","en","Ewsirdev","Web developer: websites, landing pages and Go services",[9,16,22,27],{"slug":10,"lang":5,"title":11,"date":12,"summary":13,"project":14,"minutes":15},"double-booking","Double booking: a transaction plus a partial UNIQUE index","2026-10-20","How booking-slots protects against two clients booking the same time at once, and how that protection is tested.","booking-slots",1,{"slug":17,"lang":5,"title":18,"date":12,"summary":19,"project":20,"minutes":21},"lease-and-fencing","Lease and fencing: how a queue neither loses a job nor lets a zombie finish it twice","A worker can crash, stall, or wake up after its job was taken by someone else. How the lease and the lease token in job-queue deal with that on SQLite.","job-queue",2,{"slug":23,"lang":5,"title":24,"date":12,"summary":25,"project":26,"minutes":21},"p95-nearest-rank","p95 in an uptime monitor: the nearest-rank method and what it does not hide","How uptime-monitor computes p50\u002Fp95 latency and uptime, why the nearest-rank method was chosen, and where those numbers can mislead.","uptime-monitor",{"slug":28,"lang":5,"title":29,"date":12,"summary":30,"project":31,"minutes":21},"websocket-from-scratch","WebSocket on the standard library: what really happens under new WebSocket()","Why realtime-rooms has its own RFC 6455 layer, which protocol violations it checks, and why a library is still the better choice for production.","realtime-rooms",{"slug":31,"title":33,"type":34,"stack":35,"description":41,"highlights":42,"run":47,"hue":48,"og":49,"shots":50,"case":58,"case_lang":5,"prev":77,"next":79},"Rooms: realtime chat and board","backend",[36,37,38,39,40],"Go","WebSocket","SQLite","Canvas","Docker","Realtime rooms: chat with SQLite history, an online list, a typing indicator, a shared board with strokes and cursors, anonymous nicknames. WebSocket (RFC 6455) written on the stdlib.",[43,44,45,46],"Own WebSocket layer (RFC 6455) on the stdlib","Slow-client disconnects and rate limits","Graceful shutdown with close code 1001","Load test: 360 connections in 6 rooms","cd realtime-rooms && set SEED_DEMO=1&& go run .\u002Fcmd\u002Fserver",46,"\u002Fog\u002Fen\u002Frealtime-rooms.jpg",{"desktop":51,"desktop_sm":52,"mobile":53,"dw":54,"dh":55,"mw":56,"mh":57},"\u002Fshots\u002Frealtime-rooms-desktop.webp","\u002Fshots\u002Frealtime-rooms-desktop-sm.webp","\u002Fshots\u002Frealtime-rooms-mobile.webp",1280,800,390,844,{"about":59,"features":62,"run":69,"notes":73},[60,61],"Realtime rooms: a chat with history in SQLite, an online list, a typing indicator and a shared board where every participant's strokes and cursors are visible to everyone at once. No sign-up; nicknames are anonymous.","The WebSocket protocol (RFC 6455) is written on the standard library: handshake, frames, masking, fragmentation, ping\u002Fpong and close codes. The only dependency is pure-Go SQLite without CGO; the vanilla JS and Canvas interface is embedded in the binary.",[63,64,65,66,67,68],"Room hub: two goroutines per connection, broadcasting through a bounded queue; a slow client is disconnected and does not hold the others back","Per-connection rate limits (a token bucket for chat and an overall one); ephemeral messages (cursors, typing) are dropped under load","Chat history in SQLite: a message is broadcast only after it is saved, the last 50 are sent on join and older ones load page by page","A shared Canvas board: strokes in normalised coordinates, other people's cursors with nicknames, and the current state is sent to late joiners","Graceful shutdown: every connection gets close code 1001; the browser reconnects with exponential backoff and jitter","Protocol and hub tests, a load test with 360 connections in 6 rooms; Docker and GitHub Actions",[70,71,72],"git clone \u003Crepository on request> realtime-rooms","cd realtime-rooms","SEED_DEMO=1 go run .\u002Fcmd\u002Fserver   # http:\u002F\u002Flocalhost:8086, room \u002Fr\u002Fdemo",[74,75,76],"A single process with the hub in memory, so there is no horizontal scaling. The board lives in memory and does not survive a server restart (the chat is saved in SQLite).","No TLS or authentication, and nicknames are anonymous and unprotected. There is no permessage-deflate; the Autobahn Test Suite was not run, and correctness is covered by my own tests.","The bot in the demo room answers with canned phrases and is marked as a bot: it is neither a person nor an AI.",{"slug":20,"title":78},"Conveyor: job queue",{"slug":80,"title":81},"api-gateway","Sluice: API gateway",1792697892726]