Shared nothing architecture. If you're using e.g. fastapi you can store some data in memory and that data will be available across requests, like so
import uvicorn, fastapi
app = fastapi.FastAPI()
counter = {"value": 0}
@app.post("/counter/increment")
async def increment_counter():
counter["value"] += 1
return {"counter": counter["value"]}
@app.post("/counter/decrement")
async def decrement_counter():
counter["value"] -= 1
return {"counter": counter["value"]}
@app.get("/counter")
async def get_counter():
return {"counter": counter["value"]}
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=9237)
This is often the fastest way to solve your immediate problem, at the cost of making everything harder to reason about. PHP persists nothing between requests, so all data that needs to persist between requests must be explicitly persisted to some specific external data store.Non-php toolchains, of course, offer the same upsides if you hold them right. PHP is harder to hold wrong in this particular way, though, and in my experience the upside of eliminating that class of bug is shockingly large compared to how rarely I naively would have expected to see it in codebases written by experienced devs.
From my perspective, negative expectations do have a higher chance of turning out real, but because negative expectations most often are just code for human misalignment. We have some philosophical, instinctual, or aesthetic (etc.) preferences, but then reality is always going to be broader than that. So you're bound to hit things that are in misalignment. It takes active effort to cultivate the world to be whatever particular way. But this is also why I find simple pleas to cynicism particularly hollow. It comes off as resignation, exactly where the opposite is what would be most required.
The answer, therefore, is not bitching on the internet about all the wet blankets who only see negative outcomes, but acknowledging that everything we know needs to end eventually including ourselves, and balancing optimism for the short term with cynicism for the long term. And thus discovering that a healthy cynicism for the future predictions is probably appropriate, unless you truly want to live forever and have infinite energy for everything. But that's a god.
That was also when I learned what happens if you dd a Creative Nomad Jukebox system image onto your root partition while the machine is running. The RedHat install stayed stable for about 20 minutes before weird things started failing and eventually the whole thing just locked up. Remember kids, always check you dd out file path!
The initial response was some grumbling about unionization of the doctor-class. But now they're just kinda going along with it while also complaining loudly. Profit Über alles.
Atmosphere on the other hand is very thin and mostly concentrated close to surface (half is under 5km) so it's much easier for humans to fuck it up
EDIT But seriously. I remember years ago going to a residential GT workshop encouraging private heat sink wells hosted by some boomer reformed hippies. When I asked if there were any studies on the effect of subsurface heat exchange on things like ground water temperatures or different subsurface materials one of the presenters waved it off saying it was probably fine and the other honestly admitted that they didn't know, and that that should probably give us pause before encouraging 200 homes in a square mile all sink wells.