PHP Classes
elePHPant
Icontem

IPC Shared Memory: Access data stored in shared memory containers

Recommend this page to a friend!
  Info   View files View files (11)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2006-06-19 (10 years ago) RSS 2.0 feedStarStarStarStar 68%Total: 1,916 This week: 2All time: 1,991 This week: 591Up
Version License Categories
ipc_sharedmem 1.0.0GNU Lesser Genera...PHP 5, System information
Description Author

This is a package that can be used to share information between different processes using several types of shared memory containers.

A few shared memory container classes are provided implementing the same interface: file based, SysV shm, MySQL record.

The interface has functions for atomically fetching or storing shared memory data and also functions to start or finish transactions that allow multiple read or write access operations to be safely execute assuring the necessary integrity.

Innovation Award
PHP Programming Innovation award nominee
January 2005
Number 3


Prize: One book of choice by O'Reilly
Using shared memory is a solution for exchanging information between two or more processes or programs, that may or may not be running at the same time, in the same computer or even in different computers.

The uses of shared memory can be for instance: accessing to information application variables, exchanging messages between programs, etc..

Depending on the requirements of the applications that can benefit from its use, shared memory can be implemented using for instance OS specific shared memory extensions, memory mapped files and database accessible remotely via a network.

This class implements an abstracted solution that provides a single interface for accessing storing and retrieving information from different types of shared memory containers, thus making it possible to switch between container types as the requirements of an application evolve.

Manuel Lemos
Picture of Craig Manley
Name: Craig Manley <contact>
Classes: 5 packages by
Country: The Netherlands The Netherlands
Innovation award
Innovation award
Nominee: 4x

Details
INSTALLATION:
Create the following directory structure somewhere in you PHP search path:
IPC/SharedMem

Copy ISharedMem.php into the IPC directory.
Copy File.php, ShmOp.php, and MySQL.php into the IPC/SharedMem directory.

USAGE:
See the test/example scripts. 
  Files folder image Files  
File Role Description
Plain text file File.php Class File based shared memory class.
Plain text file MySQL.php Class MySQL based shared memory class.
Accessible without login Plain text file README.TXT Doc. Instructions
Plain text file SharedMem.php Class Common Interface class.
Plain text file ShmOp.php Class PHP shmop and sysvsem extensions based shared memory class.
Accessible without login Plain text file tfile_atomic.php Example Example/test script for IPC_SharedMem_File class.
Accessible without login Plain text file tfile_trans.php Example Example/test script for IPC_SharedMem_File class.
Accessible without login Plain text file tmysql_atomic.php Example Example/test script for IPC_SharedMem_MySQL class.
Accessible without login Plain text file tmysql_trans.php Example Example/test script for IPC_SharedMem_MySQL class.
Accessible without login Plain text file tshmop_atomic.php Example Example/test script for IPC_SharedMem_ShmOp class.
Accessible without login Plain text file tshmop_trans.php Example Example/test script for IPC_SharedMem_ShmOp class.

 Version Control Reuses Unique User Downloads Download Rankings  
 0%1
Total:1,916
This week:2
All time:1,991
This week:591Up
 User Ratings  
 
 All time
Utility:90%StarStarStarStarStar
Consistency:90%StarStarStarStarStar
Documentation:75%StarStarStarStar
Examples:70%StarStarStarStar
Tests:-
Videos:-
Overall:68%StarStarStarStar
Rank:445