3 ms·
Somewhere along the way we got lost into thinking config files were remote procedure calls, and that YAML was the only RPC interface available to us. The calle
by gorgoiler 1y ago
Somewhere along the way we got lost into thinking config files were remote procedure calls, and that YAML was the only RPC interface available to us. The caller generates YAML, the receiver parses it, but more often than not the two are on the same host and use the same language*:
def say(message):
o = dict(f=say, v=message))
call(yaml.dumps(o))
…meanwhile elsewhere…
def eval(request):
o = yaml.loads(request.body)
match o[“f”]:
case “say”:
print(o[“v”])
Yes, referring to this as “madness” skips over the fact that you can now scale up your hello world printer across the internet, have auth, rate limit, etc etc. but for so many things the RPC just isn’t needed at all.
As this article gets at, config files are one of those things, and they benefit hugely from the rampant abstraction violation of skipping an intermediary text format between the program doing the configuration and the program doing the work.
*or have internal versions of their APIs available in matching languages.