Project Overview¶
Directory overview¶
- /benchmarks - phpbench based benchmark tests
- /docs - docs dir (markdown)
- /examples - example scripts
- /resources
- /benchmarks ansible playbooks setup and run benchmarks
- /docker
- /php74-librdkafka-ffi - dockerfile for PHP 7.4 image with librdkafka and ffi & rdkafka ext (based on php:7.4-cli )
- /php80-librdkafka-ffi - dockerfile for PHP 8.0 image with librdkafka and ffi & rdkafka ext (based on php:8.0-rc-cli )
- /docs - scripts to build documentation site from /docs
- /ffigen - config to build low level library bindings
- /phpunit - bootstrap and config for phpunit tests
- /test-extension - base dir for rdkafka ext compatibility tests
- /src - source dir
- /tests - tests dir
Docker Images for Development¶
Build all images
docker-compose build --no-cache --pull
Alternative: build the image individually
docker-compose build --no-cache --pull php74 php80
Alternative: build the image individually and set optional build args (LIBRDKAFKA_VERSION default = v1.5.3, RDKAFKA_EXT_VERSION default = 4.1.x for php74 / 5.x for php80)
docker-compose build --no-cache --pull --build-arg LIBRDKAFKA_VERSION="v1.5.3" --build-arg RDKAFKA_EXT_VERSION="4.1.1" php74
Test - should show latest 7.4 version
docker-compose run php74 php -v
Test - should show FFI
in modules list
docker-compose run php74 php -m
Test ffi librdkafka binding - should show current version of librdkafka:
docker-compose run php74 php examples/version.php
Test - should show rdkafka
in modules list
docker-compose run php74 php -dextension=rdkafka.so -m
References¶
- FFI extension
- librdkafka ^1.0 (docs)
- Confluent Kafka / Zookeeper docker images
- phpbench lib for benchmarking