dunglas / frankenphp

šŸ§Ÿ The modern PHP app server
https://frankenphp.dev
MIT License
6.57k stars 216 forks source link

Documentation request: architecture overview #454

Open nickchomey opened 7 months ago

nickchomey commented 7 months ago

It stands to reason that many people who will be using Frankenphp have little to no experience with Go or even Caddy.

While it does appear to be relatively easy to get started with frankenphp without such knowledge, surely people would benefit from having at least a conceptual understanding of what is going on. With that, they might even start dabbling in writing their own Go/Caddy modules.

I have no expectation that Frankenphp should provide detailed documentation on Caddy, Go etc, but would it be possible to add a simple documentation article that provides an overview of Frankenphp's architecture?

Is Caddy embedded in Frankenphp? Or is Frankenphp a Caddy Module? What about Mercure? How would we extend and/or modify them all - with additional caddy modules? Can Go code be written to make use of Frankenphp worker mode, or is frankenphp even needed if we intend to write Go code? Etc...

I'm sure those questions are contradictory and even incoherent, but I hope you get the sense of what I'm trying to describe and learn.

Id imagine it could all be explained in a few paragraphs, along with some links to relevant Caddy documentation and perhaps Go documentation.

Thanks!

natepage commented 7 months ago

Hi there!

Thank you for creating this creature (frankenphp) šŸ˜„, and thank you @nickchomey for creating this issue, I had very similar questions after reading the docs. I completely understand all this is very young, and am impressed by the amount of resources already available.

I'm really sorry I had lots of things I wanted to say/ask but when I started to writing this comment I wasn't sure how to structure it all... So I hope that an example and some context with a dot list of thougts are ok and it helps understanding the point.

I work on a bunch of projects based on Symfony + Openswoole which use functionalities like:

As much as the aboves are great, we've learned the hard way they have side effects šŸ˜„

I think it would very helpful to understand how Frankenphp "impacts" the way PHP behaves, especially with worker mode.

I'm obviously not writting all this down expecting an answer to each of those questions, but we've faced all of them while migrating our projects to Openswoole and the learning process was painful because it all looked great and simple at the start but the devil is in the details!

Sorry for this long comment, Frankenphp has got me excited, and I'm very keen to see how it evolves! I hope all this blabla makes sense and is somehow helpful, I'm not really good at putting things on paper, but would be up for a chat if needed.

Thank you!

dunglas commented 7 months ago

Hi,

Just a quick reply to say that I'm currently in vacation, but I plan to work on such docs when I'll be back!