Really Tricky Question: Trust Me

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

ole wrote:Huh? :?

OK I'm guessing RTQ stands for "read the question".
RTQ == Really Tricky Question
ole wrote:I suggested persistent connections. If that was incredibly stupid suggestion for some reason...well I've never used sockets before and please educate me :)
Sorry to confuse ... your answer was brilliant (as ever :)). A quick search of the online manual for "socket" functions obviously turned up the answer.
(#10850)
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

:D

The really tricky part is to assign a particular socket connection to a particular session. Really depends on what BIGjuevos is trying to achieve.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

pfsockopen is not going to help really because unless you're very lucky, next request would get served by a different apache process.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

arborint wrote:Sorry to confuse ... your answer was brilliant (as ever :)).
Ahhh thanks arborint you rule too! :D
pfsockopen is not going to help really because unless you're very lucky, next request would get served by a different apache process.
Really? That makes them pretty useless doesn't it?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Weirdan wrote:pfsockopen is not going to help really because unless you're very lucky, next request would get served by a different apache process.
Does this have any relation to thread safety?

/ hangs head in apologeticness since I didn't mean to take over the thread but was really curious and didn't want to look like an inexperienced n00b asking a thread related question.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Everah wrote: Does this have any relation to thread safety?
php on its own may or may not be thread-safe (it depends on the extensions loaded/compiled in). So it's actually not valid to talk about thread-safety of one particular function when entire module could be thread-unsafe.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

ole wrote:
pfsockopen is not going to help really because unless you're very lucky, next request would get served by a different apache process.
Really? That makes them pretty useless doesn't it?
Well, they serve their purpose when you want both to limit the number of connection to particular service and get rid of connection instantiation overhead.
Post Reply