Comparison of Real-Time Web Communication & Mapbox Collision Boxes

Summary of my bookmarked links and Github repositories from Mar 20th, 2024


  • WebSockets vs Server-Sent-Events vs Long-Polling vs WebRTC vs WebTransport

    The article explores various real-time web communication technologies: Long Polling, WebSockets, Server-Sent Events (SSE), WebTransport, and WebRTC. Long Polling mimics server push via XHR requests, offering immediate updates but with some delays. WebSockets allow bidirectional, low-latency communication, suitable for applications like gaming. SSE provides one-way server-to-client updates over HTTP, ideal for news feeds. WebTransport, though promising, is still in draft and complex. WebRTC, primarily for client-client interactions, is deemed niche. The comparison highlights latency, throughput, and scalability differences. Despite limitations like browser connection caps, each technology suits distinct use cases.

Github repositories

  • codemonger-io/mapbox-collision-boxes

    Mapbox Collision Boxes: A utility library for Mapbox GL JS that calculates collision boxes of symbols on a Mapbox map in screen coordinates. It's compatible with mapbox-gl versions 2.x and 3.x. By integrating this library, you can retrieve hidden features obscured by clicked symbols on the map. Developed due to the absence of a native Mapbox GL API for such functionality, it avoids cluttering the map with overlapping symbols. The library's API documentation and tips for usage are available. For further details, the developer's blog post offers additional insights.