A Go-based HTTP-like protocol over WebSocket for building scalable, customizable instant messaging servers.
lhttp is a custom protocol built on top of WebSocket designed to simplify the creation of scalable instant messaging (IM) services without relying on XMPP. It provides a familiar HTTP-like structure for messages, enabling real-time, bidirectional communication with features like publish/subscribe and cluster support. It solves the problem of building performant, customizable IM systems with a simpler protocol than traditional options.
Developers and engineers building scalable instant messaging services, chat applications, or real-time notification systems who want to avoid the complexity of XMPP. It is also suitable for those needing a WebSocket-based protocol that integrates easily with existing HTTP services in languages like PHP, Java, and Python.
Developers choose lhttp for its high performance, simplicity, and flexibility, offering a protocol that can publish 10,000 messages in 0.04 seconds on modest hardware. Its unique selling point is combining WebSocket real-time capabilities with an HTTP-like message structure and built-in cluster support, allowing for easy customization and horizontal scaling without the overhead of traditional IM protocols.
go websocket, a better way to buid your IM server
The README states lhttp can publish 10,000 messages in 0.04 seconds on modest hardware (single-core CPU, 1GB memory), making it exceptionally fast for real-time applications.
lhttp is designed to scale horizontally using a message center cluster (gnatsd), as shown in the architecture diagram, allowing multiple servers to handle load.
It works well with HTTP, enabling interoperability with languages like PHP, Java, and Python through standard HTTP POST requests for publishing messages, as demonstrated in the upstream feature.
Developers can define custom processors and commands, with everything being customizable, as illustrated in the usage examples where BaseProcessor is extended for chat functionality.
Clustering requires running gnatsd as a separate message broker, adding deployment and management overhead beyond the core lhttp server.
Only the JavaScript SDK is complete; the C SDK is marked as in progress, restricting client-side development in other languages without custom implementation.
lhttp uses a non-standard, HTTP-like protocol over WebSocket, which developers must learn and debug, increasing integration effort compared to raw WebSocket or established protocols.
Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http
Pure Go implementation of the WebRTC API
Reliable UDP Transmission Optimizer based on KCP: Enhancing network efficiency in poor connectivity environments.
Cloudflare Tunnel client
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.