Skip to content

jiangshengjun/aps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anjuke PHP Service

We introduce three simple method to APF framework.

  • publish()
  • start_request()
  • wait_for_replies()
<?php
$apf->publish('DEBUG', $_SERVER);

start_request('sql-executor')->query('table_a',
    'SELECT count(*) FROM table_a WHERE field = 123',
    function($reply, $status) use (&$count_a) {
        if ($status == 200) { $count_a = $reply->rows[0][0]; }
    }
);
start_request('solr-executor')->query('index_a',
    'q=*:*&sort=score+desc'
    function($reply) use (&$count_b) {
        if ($reply) { $count_b = $reply->records; }
    }
);
wait_for_replies();
echo $count_b, $count_b, "\n";

See the Specification for details.

Note: PHP extenstion for ZeroMQ and MessagePack required

About

Anjuke PHP Service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published