Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":2972,"date":"2019-12-30T09:21:25","date_gmt":"2019-12-30T09:21:25","guid":{"rendered":"https:\/\/support.aklwebhost.com\/?post_type=manual_kb&p=2972"},"modified":"2019-12-30T09:21:25","modified_gmt":"2019-12-30T09:21:25","slug":"beanstalkd-and-beanstalk-console-on-ubuntu-14","status":"publish","type":"manual_kb","link":"https:\/\/support.aklwebhost.com\/knowledgebase\/beanstalkd-and-beanstalk-console-on-ubuntu-14\/","title":{"rendered":"Beanstalkd and Beanstalk Console on Ubuntu 14"},"content":{"rendered":"

Introduction<\/h3>\n

Beanstalkd is a work queue server that runs time-consuming tasks asynchronously. It comes in very handy if you manage or develop an application (web, mobile, etc.) that needs to perform time-consuming tasks (like sending emails), and you don’t want your users to wait while the task is running. You can queue tasks with Beanstalkd and have your application move on to the next operation.<\/p>\n

Beanstalk Console is a web admin interface for Beanstalkd that was written in PHP. It provides a friendly interface that you can use to see all the jobs and their current states (urgent, ready, reserved, delayed and buried).<\/p>\n

Installation<\/h3>\n
    \n
  1. Spin up an AKLWEB HOST server instance running\u00a0Ubuntu 14.10 x64<\/strong>\u00a0and SSH into the server after it’s done provisioning.<\/li>\n
  2. Install Beanstalkd.\n
    sudo apt-get update\r\nsudo apt-get install -y beanstalkd\r\n<\/code><\/pre>\n<\/li>\n
  3. Install Beanstalk Console by using PHP’s package manager, Composer.\n
    sudo apt-get install -y php5 php5-cli\r\ncurl -sS https:\/\/getcomposer.org\/installer | php\r\nmv composer.phar \/usr\/local\/bin\/composer\r\ncomposer create-project ptrofimov\/beanstalk_console -s dev \/app\/beanstalk-console\r\n# Note that \"\/app\/beanstalk-console\" can be any directory you choose\r\n<\/code><\/pre>\n<\/li>\n<\/ol>\n

    Running Beanstalk<\/h3>\n
      \n
    1. Make sure that Beanstalkd is running.\n
      sudo service beanstalkd start\r\n<\/code><\/pre>\n<\/li>\n
    2. Start Beanstalk Console by going to the directory where it was installed and starting a PHP server instance.\n
      cd \/app\/beanstalk-console\r\nphp -S [aklwebhost-instance-ip]:7654 -t public\r\n# *where **[aklwebhost-instance-ip]** is the IP address of the AKLWEB HOST instance you spun up or a domain name pointing to it*\r\n<\/code><\/pre>\n<\/li>\n
    3. Navigate to\u00a0http:\/\/[aklwebhost-instance-ip]:7654<\/code>. You will be greeted with a “Hello!” screen that contains an “Add Server” button. Click the button and accept the defaults (localhost:11300).<\/li>\n<\/ol>\n

      One thing to note here is that you don’t have to use PHP with Beanstalk. Beanstalk is technology agnostic. Also, there are two sides to a queue – adding jobs, and removing jobs. Removing jobs is usually done by what we refer to as a “worker process”. If your technology stack uses PHP, you can use\u00a0Pheanstalk<\/span><\/strong><\/a>\u00a0to perform both tasks.<\/p>\n

      Conclusion<\/h3>\n

      A queue server that can run jobs in the background asynchronously is a must considering users expect things to happen instantly with your application. Beanstalkd is a tried and tested work queue server that can reduce latency issues with your applications, thereby causing your users to have richer experiences.<\/p>\n

      \n
      \n

      Want to contri<\/h2>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[245,247],"manual_kb_tag":[480],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2972"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2972"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2972\/revisions"}],"predecessor-version":[{"id":2973,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2972\/revisions\/2973"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2972"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2972"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}