2017 © Pedro Peláez
 

library jsmemory

mutli php process share memory

image

jue/jsmemory

mutli php process share memory

  • Tuesday, November 28, 2017
  • by masixun71
  • Repository
  • 1 Watchers
  • 0 Stars
  • 80 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 1 % Grown

The README.md

Jsmemory

In a single server to share content in multiple processes, the use of linux shared memory. Encapsulates complex uses and provides a simplified way to make calls.
在单台服务器多进程中共享内容,利用linux的共享内存。封装了复杂使用,提供简化的方法进行调用。

Rely

  • #### ext-msgpack

note

By default, the use of shared memory is for static data or basically does not change or change the less data, when the data changes, you need to manually delete the shared memory. The future will be extended automatically delete function.
默认情况下,共享内存的使用是针对于静态数据或者基本上不会变更或变更情况较少的数据,当数据有变更时,需要手动删除共享内存。未来会扩展释放删除功能。

linux delete shm

ipcrm -m shmid

Set according to their own circumstances to delete

根据自身情况设置删除

Example

class tt
{

    public $a;
    public $b;

    public function __construct($a, $b)
    {
        $this->a = $a;
        $this->b = $b;
    }

}


$storage = new Storage(0xff3,1000);


$sme = new Smemory($storage);

//$sme->set('a', '1233');
//$sme->set('b', new tt(1, 2));

var_dump($sme->get('a'));
var_dump($sme->get('b'));

The Versions

28/11 2017

dev-master

9999999-dev

mutli php process share memory

  Sources   Download

by 马斯珣

28/11 2017

v0.0.0.5

0.0.0.5

mutli php process share memory

  Sources   Download

by 马斯珣

28/11 2017

v0.0.0.4

0.0.0.4

mutli php process share memory

  Sources   Download

by 马斯珣

28/11 2017

v0.0.0.3

0.0.0.3

mutli php process share memory

  Sources   Download

by 马斯珣

24/11 2017

v0.0.0.2

0.0.0.2

mutli php process share memory

  Sources   Download

by 马斯珣

22/11 2017

v0.0.0.1

0.0.0.1

mutli php process share memory

  Sources   Download

by 马斯珣