Easy Code Share >

PHP Codes Access Shared Memory in Linux with Lock

PHP Process Access Shared Memory on Linux

A global counter example introduced here applys Shared Memory to store a common counter value for Linux processes, which tend to get incremental amounts randomly. Moreover, we assume HTTP requests require this counter, and then focus on the behavior of child processes forked by Apache daemon. As experimental proof, the simulation model in another Linux … Read more

Easy Code Share >

How to Pass HTTP Request into Queue using PHP

Pass HTTP Request to Queue using PHP on Linux

An alternative way to treat HTTP requests is introduced. It passes a request to a Queue, but get result from another Queue. At opposite ends of two Queues, a running daemon process get token from a global counter file, and then return it into Queue. Before that, for clarification, basic knowledge about Apache MPMs will … Read more