In a new article from the O'Reilly PHP DevCenter today, there's an interesting topic discussed that most people wouldn't think about - using shared memory to convey information between processes.
IPC is one of the most important features of the UNIX systems. It allows two processes to communicate with each other. In this article we'll work with two System V IPC functions, semaphores and shared memory. [...] At a very high-level, we can divide interprocess communication into the most important and big parts: Messaging (pipes and message queues), Shared memory, RPC (remote procedure calls), Synchronization (semaphores and any kind of locks), and Network communication (sockets API). This article introduces shared memory and synchronization (semaphores). A detailed explanation of these parts will take too much time - there's a huge amount of different material and documentation.
Using this method with IPC, you can store information in chunks called "semaphores" stored in the IPC queue on the server. There are built-in PHP functions to work with these semaphores. Another added advantage of these blocks of stored information is that they're not just limited to PHP - you can store them with PHP and another application (like a perl script or Apache server) can come along and pull what it needs.




