aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: eb1dfc80f308029e2b7d8069d987364458eacb53 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 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](https://git.andrewyu.org/hax/haxircd.git)
  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.