dumb web apps
intro⌗
Web apps have increasingly become more sophisicated and powerful. This does not only extend to cooperate web apps that are ran by companies but also self-hosted web apps that are built by volunteers. Web apps like Jellyfin provide automatic metadata fetching, user management for their service, categorizing and sorting media, as well as other features that can offer an experience similar to a cooperate gaint like Netflix.
Today, I plan to offer a counter idea: the dumb web app. A dumb web app is exactly the opposite of Jellyfin, it has a singular purpose and doesn’t get outside of that singular purpose. It can be extended but not through modifying it but incooperating it with the ecosystem of web apps that an administrator has on their web server.
motivation: unix core utilities⌗
Any good computer user knows or at-least has heard about the idea of the unix core utilities, for those who do not know; coreutils are a series of programs that each serve a particular purpose and can be combined together to provide more functionality than using them alone.
To help illustrate this idea, I’ll compare doing a search operation in windows vs in a unix or unix-like operating system. In Windows, a user might open the file via notepad (or something similar), look at the tooltip to find the search hotkey and then use it to achieve what they want. The process speeds up over time as the user’s body turns this into muscle memory. In Unix(or unix-like) operating systems, one can invoke the good ol’ command cat
to view the file’s contents, and invoke the search command grep
to sort through the file contents and find any lines containing their query.
The difference is that in Windows you have to depend on notepad’s internal search functionality, while in Unix you could use grep
or any other program to search through a file. Not to say that Windows does not support unix’s way of process communication, it does, but you have to go outside of your way to achieve that sort of functionality.
grep
’s functionality compared to notepad is a lot more powerful. Imagine you have a log file that different types of prefixes, say: Process, File, Network. Also, say you this log file has the exact date of each line written to it. The file would look similarily to this:
2022-09-01 06:04:12 [Process] Started itself
2022-09-01 06:04:15 [File] Deleted `ok.txt`
2022-09-01 06:04:16 [File] Deleted `deleteme2.txt`
2022-09-01 06:04:16 [Network] eth0 has stopped
.....
And so on. With notepad, you can only do one search per line without the support for regular expressions. Whilst with grep
, you could do multiple searches at once. Also, notepad can only do one search at a time but grep
provides every single result for you to print or to write to a file.
So, with grep
, you could filter out all the [Process]
prefixes at a specific date, say 2022-09-04
, or you could make it match a year or a month. This is because grep
doesn’t necessarily need a file, it could use a stream like another grep
process.
Imagine, how powerful web apps could be if they could be used in conjuction with each other. Instead of a web app like Jellyfin fetching all metadata, sorting through directories, and handling stream operations, each feature could be delegated to a web app specifically made for that functionality.
pros of dumb web apps⌗
I think that dumb web apps have 3 major pros over the more sophisicated web apps. These good traits do not show right away but are implicit. They are:
- More power through combination of different functionalities
- Less performance issues by benchmarking tools and replacing ineffective ones
- Less security vulnerabilities through standing the test of time
As we seen with the grep vs notepad
example, software that can be extended outwardly usually has more power than other software. A sophisicated web app like Jellyfin could delegate its implicit features to other software so that the technological debt becomes a lot less, allowing for easier and more robust implementation of features.
Another way of making dumb web apps have more power is through wrapping other web apps inside them. A good application of this idea is Authelia, the Single Sign On portal for web apps. Basically, what authelia does is filter out traffic to specific routes(say other web apps’ /api
route) and redirecting users to its portal. Authelia allows any dumb web app to have very secure login dashboards that work inside your network.
Performance issues can also be mitigated by swapping bad software with good software. Similarily to how grep
is only a program that deals with streams, dumb web apps that interact with other dumb web apps can define an interface that, if any other dumb web app implement, allows for communication between them. Effectively making software compete not for features but for stability and performance.
Performance is not the only field that benefits from dumb web apps, security vulnerabilities are also reduced because of where specifically they happen. Think about how easy is it to find security vulnerabilities in a small system rather than a big system with thousands of lines of code. Not only that but also swapping insecure software with secure software very easily.