Stack Agent Thing frame work for Thing based Agent processing with Stack serialization and deserialization.
To share a Thing's state. With other Things.
Copyright 2018-2019. Stackr Interactive Ltd.
- PHP >= 7
- BCMath
- Gearman
To install all the required parts:
composer require nrwtaylor/stack-agent-thing
Stack build recipe. See BUILD
in root folder.
mysql> DESCRIBE stack;
+--------------+---------------+------+-----+-------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+---------------+------+-----+-------------------+-------+
| id | int(11) | YES | | NULL | |
| uuid | char(36) | YES | UNI | NULL | |
| task | varchar(200) | YES | | NULL | |
| status | tinyint(1) | NO | | 1 | |
| created_at | datetime | NO | | CURRENT_TIMESTAMP | |
| nom_to | varchar(80) | YES | | NULL | |
| nom_from | varchar(80) | YES | MUL | NULL | |
| associations | varchar(998) | YES | | NULL | |
| message0 | varchar(998) | YES | | NULL | |
| message1 | varchar(998) | YES | | NULL | |
| message2 | varchar(998) | YES | | NULL | |
| message3 | varchar(998) | YES | | NULL | |
| message4 | varchar(998) | YES | | NULL | |
| message5 | varchar(998) | YES | | NULL | |
| message6 | varchar(998) | YES | | NULL | |
| message7 | varchar(998) | YES | | NULL | |
| settings | varchar(998) | YES | | NULL | |
| variables | varchar(3998) | YES | MUL | NULL | |
+--------------+---------------+------+-----+-------------------+-------+
sudo apt install php7.1-bcmath
sudo apt-get install php-bcmath
Not all the settings need to be set. But you will need to enter the MySQL database settings.
php -S localhost:8080 -t public public/index.php
sudo apt install php7.1-bcmath
sudo apt-get install php-bcmath
restart
* * * * * cd /var/www/html/<site name> && /usr/bin/php -q /var/www/html/<site name>/agents/Cron.php >/dev/null 2>&1
Browse to:
http://localhost
http://localhost/privacy. Select 'Start'.
agent roll
agent ping
agent snowflake
Make a Thing
$thing = new Thing(null); // creates a UUID for a thing
Show a Thing's UUID
echo $thing->uuid; // display UUID
Instantiate a Thing
$thing->Create("from","to","test message");
Run an agent on a Thing
$agent = new Start($thing); // runs the Start agent
Run the start agent from a browser:
http://www.stackr.test/thing/67a8038d-4c19-4777-9b5f-18b8b74d8f1e/start
- Rob Allen for Slim
- Jeff Atwood and Joel Spolsky for Stack Overflow
- Alan Turing for On Computable Numbers
https://stack-agent-thing.slack.com/archives/C01PT2V6B8U
Slack invitation