What should i pay attention to when building web server that should hold long connections

This page summarizes the projects mentioned and recommended in the original post on /r/golang

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • Socket.io

    Realtime application framework (Node.JS server)

  • If you are just sending requests to base functions through gRPC then it should be rather straight-forward; however, once you start creating a database and dealing with more complex types, then you will start to see more issues with sessions staying connected. The absolutely most advanced issues you will deal with in terms of a session will be marshaling and unmarshaling; therefore, use the gorilla mux router but don't use gorilla sessions, just build your server as being a request based api. If you want to build a chat application or a video streaming platform, then just build your own concept of a session (gorilla is great don't get me wrong, but it's a dependency). That is truly the beauty of Golang, where most mainstream languages are heavily dependent on open source pkgs (*cough* socket.io *cough*) Go can be constructed into fairly sophisticated systems quite easily.

  • httprouter

    A high performance HTTP request router that scales well

  • therefore, use the gorilla mux router but don't use gorilla sessions, just build your server as being a request based api. If you want to build a chat application or a video streaming platform, then just build your own concept of a session (gorilla is great don't get me wrong, but it's a dependency). I agree with not using gorilla session as it's unnecessarily heavy and it sounds like OP could get away with returning a token to the clients which they'll set as a http header on every request, if sessions are even needed. That being said gorilla mux is also a dependency and pretty much the worst performing router out there. Use the stdlib mux or if you need something more sofisticated I'd recommend httprouter or chi but chi had a semver issue recently and the community was pretty pissed about it so maybe not chi. Using the gorilla mux is also a dependency.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
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

  • From Homemade HTTP Router to New ServeMux

    4 projects | dev.to | 26 Apr 2024
  • The Gorilla web toolkit project is being revived, all repos are out of archive mode.

    5 projects | /r/golang | 12 Jul 2023
  • go-mir - a toolkit to develop RESTful API backend service like develop service of gRPC

    10 projects | /r/golang | 31 Mar 2023
  • mux VS Don - a user suggested alternative

    2 projects | 15 Mar 2023
  • chi VS Don - a user suggested alternative

    2 projects | 15 Mar 2023