{"action":"opened","issue":{"url":"https://api.github.com/repos/phstc/shoryuken/issues/169","labels_url":"https://api.github.com/repos/phstc/shoryuken/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/phstc/shoryuken/issues/169/comments","events_url":"https://api.github.com/repos/phstc/shoryuken/issues/169/events","html_url":"https://github.com/phstc/shoryuken/issues/169","id":124362420,"number":169,"title":"Recommended workflow for Elastic Beanstalk","user":{"login":"ruuts","id":468526,"avatar_url":"https://avatars.githubusercontent.com/u/468526?v=3","gravatar_id":"","url":"https://api.github.com/users/ruuts","html_url":"https://github.com/ruuts","followers_url":"https://api.github.com/users/ruuts/followers","following_url":"https://api.github.com/users/ruuts/following{/other_user}","gists_url":"https://api.github.com/users/ruuts/gists{/gist_id}","starred_url":"https://api.github.com/users/ruuts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruuts/subscriptions","organizations_url":"https://api.github.com/users/ruuts/orgs","repos_url":"https://api.github.com/users/ruuts/repos","events_url":"https://api.github.com/users/ruuts/events{/privacy}","received_events_url":"https://api.github.com/users/ruuts/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-30T15:36:05Z","updated_at":"2015-12-30T15:36:05Z","closed_at":null,"body":"Hi!\r\n\r\nWe are about to switch over to Elastic Beanstalk.\r\nCurrently we use delayed_job with [a hacky method to instantiate workers](http://www.dannemanne.com/posts/post-deployment_script_on_elastic_beanstalk_restart_delayed_job).\r\nYou don't know when Amazon drops the (undocumented) support for post deploy scripts.\r\n\r\nThe right solution would be deploying a separate worker environment alongside the web environment.\r\nAnother important factor is that workers processes can auto scale separate from the web processes.\r\n\r\nThe worker environment works by:\r\n\r\n1. Spawning a web server\r\n2. And spawning a daemon that will poll for SQS messages.\r\n3. When there is a SQS message it will send that message to a web server endpoint.\r\n4. The endpoint processes the SQS message.\r\n5. When the job is finished it will respond with a 200.\r\n6. The polling process will than mark the actual SQS as finished.\r\n\r\nHow should the web server process the SQS message?\r\nI can imagine instantiating Shoryuken manually and feeding it the message.\r\n\r\nAn alternative could be using the AWS sdk but I like a more abstracted version so that we are less tied to Amazon.\r\n\r\nThanks for helping out!"}}