2017 © Pedro Peláez
 

project globaldata

image

victorruan/globaldata

  • Thursday, August 25, 2016
  • by victorruan
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 22 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

GlobalData

进程间数据共享组件,用于分布式数据共享。服务端基于Workerman。客户端可用于任何PHP项目。, (*1)

服务端

use Workerman\Worker;
require_once __DIR__ . '/../../Workerman/Autoloader.php';
require_once __DIR__ . '/../src/Server.php';

$worker = new GlobalData\Server('127.0.0.1', 2207);

Worker::runAll();

客户端

require_once __DIR__ . '/../src/Client.php';

$global = new GlobalData\Client('127.0.0.1:2207');

var_export(isset($global->abc));
$global->abc = array(1,2,3);
var_export($global->abc);
unset($global->abc);
var_export($global->abc);
$global->abc = array(1,2,3);
var_export($global->abc);
var_export($global->cas('abc', array(1,2,3), array(5,6,7)));
var_export($global->abc);

The Versions

25/08 2016

dev-master

9999999-dev http://www.workerman.net

  Sources   Download

MIT

The Requires

 

02/06 2016
29/04 2016
26/02 2016