reinventing PHP from first principles

· · Web · 3 · 0 · 4

could you embed a database in a self-modifying Rust binary? Am I losing my mind? seriously i think that is the single worst issue about PHP. otherwise its kinda fine IMHO

@Johann150 I'm just thinking. what if everything was a CGI app. CGI activitypub implementation. CGI forum. CGI gemini host. etc. the biggest problem with CGI is startup performance for interpreted languages, but Rust (or Go) solves this I think *FastCGI solves this I think is what you meant to say. But I think nowadays FastCGI has mostly been replaced by the server just implementing HTTP directly. Since there will usually be some kind of HTTPS terminating reverse proxy in front you can be a bit more lax in that kind of HTTP implementation I would guess.

@Johann150 fastCGI and reverse proxying require a running process, as opposed to just a flat file. adds complexity to the application. Well if there is no running process, there will always be some startup cost, no matter which programming language you use. Because the process has to be started, stuff allocated and so on, right? It is probably more severe for interpreted (or JIT-compiled) languages, but I wouldn't say Go or Rust "solve" this issue.

But in the end, how much does the performance even matter in this discussion, is it in the context of building enterprise grade stuff designed for thousands of users a second? Surely not.

@Johann150 yeah exactly. I should do some benchmarking but I bet a rust CGI app would be able to handle enough requests/second for any use case I've encountered You might be able to? But it's probably going to be much easier to just have a second file which is an sqlite database.

Sign in to participate in the conversation

Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them.