Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Anjuke PHP Service
branch: master

This branch is 1 commit behind anjuke:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
doc
example
gsd
pygsd
src
README.md

README.md

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

Something went wrong with that request. Please try again.