webappirc
This is currently just an idea with no implementation at all.
There are many ways people attempt to achieve scalable JavaScript-based web applications. While my disdain for web applications that uses unnecessary JavaScript persists, I do wish to see what I could do in this realm.
Instead of using Kubernetes and other approaches to load balancing, I would like to take a novel approach that uses the existing internal-federation of IRC networks for load balancing. I have no idea how this should be implemented, but the idea is:
- The browser requests the initial static web page.
- The web page is some simple JavaScript that connects to a server via WebSocket IRC, and renders content according to what it receives from the IRC server (of whatever desired format: HTML, JSON, or perhaps some new protobuf-like thing).
- On the side of the IRC network, there are oper'ed clients (perhaps pseudoservers, or perhaps HaxIRCd pseudoclients) that talk to newly connected users, and state is synchronized as the oper'ed clients communicate with each other.
There are some limitations that I haven't thought of mitigations to yet:
- Various race conditions.
- IRC messages in most server protocols must be interpreted sequentially, and that's not necessarily the most scalable way to do things.