The console application requires Redis server. Download latest stable version of redis from official website https://redis.io/download
Unpack downloaded archive. Go to unpacked folder and execute following command
$ make install
If compiling process fails execute following command
$ sudo make install
In result in folder src should appear binary file redis-server. If compiling process still fails then refer Redis documentation.
To start Redis server go to src folder and execute file redis-server. E.g.:
$ cd /home/user/Downloads/redis-5.0.5/src
$ redis-server
Follow the installation instructions https://github.com/phpredis/phpredis/blob/develop/INSTALL.markdown
If you wish to compile Redis client php extension from sources then clone git-repository to any location on your computer from https://github.com/phpredis/phpredis.git
Open your Database Management System and execute in it commands from script db.sql
Edit config.php to correspond your DB settings
To start generator go to project's root folder and execute the following command
$ php GeneratorScriptName.php -c x -t y
where GeneratorScriptName replace with generator's filename, x - replace with count of generating numbers, y - replace with time in milliseconds between each iteration. E.g.:
$ php FibonacciGenerator.php -c 150 -t 1000
After the generating process has been ended the script will be ended automatically.
To start subscriber go to project's root folder and execute the following command
$ php SubscriberScriptName.php -t y
where SubscriberScriptName replace with subscriber's filename, y - replace with time in milliseconds between each iteration. E.g.:
$ php FibonacciSubscriber.php -t 1000
After reading all numbers the script will continue working "listening" for new data(numbers). To interrupt script, press the key combination Ctrl + C.