We Improved Reliability of Our WebSocket Connections

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • engine.io

    The engine used in the Socket.IO JavaScript server, which manages the low-level transports such as HTTP long-polling and WebSocket.

  • Ah, yep, that explains it.

    They do solve this problem as documented: https://github.com/socketio/engine.io/blob/64d57545116c7a7d9...

  • socket.io-client

    Realtime application framework (client)

  • > Conversely, if the client does not receive a PING packet within `pingInterval + pingTimeout`, it will consider that the connection is closed.

    Indeed looks like a solid way to solve the client-side recognition of a broken connection!

    --

    That said, I'm a little confused because I cannot find any mention of `pingTimeout` in their JS client [0], and `pingInterval` is only mentioned in an implementation of a test server [1]. I wonder if I'm looking at the wrong thing.

    [0]: https://github.com/socketio/socket.io-client/search?q=pingti...

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • Primus

    :zap: Primus, the creator god of the transformers & an abstraction layer for real-time to prevent module lock-in.

  • Indeed it does! https://github.com/primus/primus/blob/a7ba7249cb0205a01629da...

    I do wish we didn't all have to reinvent this wheel though…

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts