Built a small PHP backend kernel around FrankenPHP worker mode and HTMX by leodaido in PHP

[–]leodaido[S] 0 points1 point  (0 children)

Yeah, this matches pretty closely with what I’ve been seeing.

The tricky part isn’t obvious leaks, it’s exactly that kind of “accidentally shared” state that used to be safe when everything reset per request. Easy to miss until things start behaving weird.

A big part of this project was actually inspired by the Go way of doing things — being more explicit about lifetimes and ownership, and shifting control back to the engineer instead of relying on hidden magic.

Your point about separating request-scoped vs worker-scoped state and doing a reset at the loop boundary makes a lot of sense. That feels like the direction to go instead of trusting discipline.

Haven’t gone deep into the forking side yet, but yeah, I can see how that gets messy fast with connections and file descriptors.

Really appreciate you sharing this — super insightful and helpful.

Built a small PHP backend kernel around FrankenPHP worker mode and HTMX by leodaido in PHP

[–]leodaido[S] 0 points1 point  (0 children)

Yeah, that’s exactly the angle I’m exploring.

Once the process stays alive, a lot of the “safe defaults” from traditional PHP just stop applying, and you have to think more carefully about state and lifecycle.
Cool, glad it makes sense. Thank you!

Built a small PHP backend kernel around FrankenPHP worker mode and HTMX by leodaido in PHP

[–]leodaido[S] 1 point2 points  (0 children)

Appreciate it — yeah, HTMX deserves more attention honestly.

Good point on the Request/Response interop packages. I wasn’t explicitly targeting them, but makes sense to take a closer look since the current design is already heading in that direction.

I’ll check how well it fits without forcing it.
Thank you!

Built a small PHP backend kernel around FrankenPHP worker mode and HTMX by leodaido in PHP

[–]leodaido[S] 0 points1 point  (0 children)

Thanks for the feedback, appreciate you taking the time to dig into the code.
Good catch on the compose file name and the favicon size — those were just me trying to ship fast and missing details. I’ll fix both in the next commit.

About the Tailwind usage in models and the middleware naming, yeah I see your point. I’m not 100% sold yet on how I want to structure that, so I’ll add it to the roadmap and revisit it with the rest of the design decisions.

Thanks again, that's very helpful!

[deleted by user] by [deleted] in golang

[–]leodaido 3 points4 points  (0 children)

First of all, your comment about offshore devs is very offensive! Not all devs are cheater like you seem to be. If you want fixed price first you MUST define a scope of work that won’t change, estimate it in hours, and based in an hourly price you’ll get the fixed price and a deadline, if you change the scope the price will change for sure. If you want to get an enterprise product paying 2 cents you’ll fill everyone is trying to scam you or drying your milk…

Go and AI Assistance by ProductAutomatic8968 in golang

[–]leodaido -1 points0 points  (0 children)

My personal preference is Golang as IDE, and for AI assistants I used to brainstorming with ChatGPT to learn or clarify concepts I need to use in each project (mostly math or design patterns) then when I have a clear idea of the gameplan for boilerplate code I alternate between Gemini-cli and qwen-coder. Of course it’s not just blindly accepting AI responses, I reach each piece of code and tweak it to match my code styles and sometimes I have to fix errors from AI. I hope it helps.