GithubHelp home page GithubHelp logo

test_numbers-generator's Introduction

Installing Redis server

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

Installing Redis client

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

Creating DB

Open your Database Management System and execute in it commands from script db.sql

Configuring app

Edit config.php to correspond your DB settings

Starting the generators

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.

Starting the subscribers

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.

test_numbers-generator's People

Contributors

ivoyt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.