phpbar.de logo

Mailinglisten-Archive

[php] Serversockets

[php] Serversockets

SvenFuchs_(at)_t-online.de SvenFuchs_(at)_t-online.de
Wed, 13 Dec 2000 23:59:54 +0100


Hallo,

kann mir jemand das folgende erklären? Sieht für mich nach einer
Architektur aus, die ich sehr gut gebrauchen könnte und von daher gern
nachbauen würde. Aber ... ich kapiers nicht recht.

Für jeden Hint dankbar. (Das Original-Posting find ich schlicht nicht
mehr. Ich hatte es irgendwann mal kopiert, ...)

Viele Grüße,
Sven Fuchs

------------------------------------------

Submitted By: Niels Peen
Date: 09/22/00 18:59
Those of you dealing with a larger code base all know the overhead this
can cause. Even if you include only the files you really need or write
some nifty loader which loads only the required files the performance
can still be lower then you would like.
Then we noticed the current PHP4 version in CVS (2000-09-08) supports
server sockets. What we did is simple. We split our application up in 2
parts. The first part is our large code base which we just load
completly and then have it listen on a socket. Then we create a very
simple frontend which opens a connection to our codebase and returns the
result.
To pass our cookies and get and post variables to our backend we put
these and all other stuff we want to pass on in an array which we
serialize and pass to the backend.
Depening on how suitable your code base is (you need to have your
functions return stuff instead of echo, and be clean with your use of
variables, clearing database results,etc) this could mean an extreme
performance increase with only 15 minutes work as it did for us.

-------------------------------------------





php::bar PHP Wiki   -   Listenarchive