Realtime Collaborative Web Apps Without ClojureScript: The Power of Clojure and Datastar
2025-04-11
This article showcases a real-time multiplayer web game built using Clojure and the lightweight framework Datastar. Surprisingly, it uses zero ClojureScript and no user-written JavaScript! By streaming the entire main element of the page to the client every 200ms and leveraging Datastar's efficient DOM diffing algorithm, it achieves a smooth, real-time collaborative experience. The author cleverly uses SSE (Server-Sent Events) and Brotli compression to address bandwidth concerns and avoid the complexities and performance bottlenecks of WebSockets. The project demonstrates the potential of Clojure in building high-performance, real-time collaborative web applications, offering developers a simple and efficient alternative.
Read more
Development