{"action":"created","issue":{"url":"https://api.github.com/repos/democracyworks/usps-processor/issues/23","labels_url":"https://api.github.com/repos/democracyworks/usps-processor/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/democracyworks/usps-processor/issues/23/comments","events_url":"https://api.github.com/repos/democracyworks/usps-processor/issues/23/events","html_url":"https://github.com/democracyworks/usps-processor/pull/23","id":66609698,"number":23,"title":"[EN] Start importer in a daemon, api as web, in new main.","user":{"login":"ericnormand","id":116172,"avatar_url":"https://avatars.githubusercontent.com/u/116172?v=3","gravatar_id":"","url":"https://api.github.com/users/ericnormand","html_url":"https://github.com/ericnormand","followers_url":"https://api.github.com/users/ericnormand/followers","following_url":"https://api.github.com/users/ericnormand/following{/other_user}","gists_url":"https://api.github.com/users/ericnormand/gists{/gist_id}","starred_url":"https://api.github.com/users/ericnormand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericnormand/subscriptions","organizations_url":"https://api.github.com/users/ericnormand/orgs","repos_url":"https://api.github.com/users/ericnormand/repos","events_url":"https://api.github.com/users/ericnormand/events{/privacy}","received_events_url":"https://api.github.com/users/ericnormand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"cap10morgan","id":59748,"avatar_url":"https://avatars.githubusercontent.com/u/59748?v=3","gravatar_id":"","url":"https://api.github.com/users/cap10morgan","html_url":"https://github.com/cap10morgan","followers_url":"https://api.github.com/users/cap10morgan/followers","following_url":"https://api.github.com/users/cap10morgan/following{/other_user}","gists_url":"https://api.github.com/users/cap10morgan/gists{/gist_id}","starred_url":"https://api.github.com/users/cap10morgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cap10morgan/subscriptions","organizations_url":"https://api.github.com/users/cap10morgan/orgs","repos_url":"https://api.github.com/users/cap10morgan/repos","events_url":"https://api.github.com/users/cap10morgan/events{/privacy}","received_events_url":"https://api.github.com/users/cap10morgan/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-04-06T13:43:37Z","updated_at":"2015-04-06T13:57:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/democracyworks/usps-processor/pulls/23","html_url":"https://github.com/democracyworks/usps-processor/pull/23","diff_url":"https://github.com/democracyworks/usps-processor/pull/23.diff","patch_url":"https://github.com/democracyworks/usps-processor/pull/23.patch"},"body":"This branch continues the migration from Immutant to Immutant 2.\r\nThe previous version ran `immutant.daemons/daemonize` with a :singleton?\r\nfalse option. Unfortunately, Immutant 2 does not allow such an\r\noption. It is always run as a singleton, which means that if run in a\r\nwildfly cluster, at most one version will be running on the cluster at\r\nthe same time.\r\n\r\nIf we are not using a wildfly cluster, the point is moot and the\r\nsolution in this branch is satisfactory.\r\n\r\nIf we are using a wildfly cluster, we have to think about whether\r\nrunning it as a singleton is reasonable, and if not, find a new\r\nsolution.\r\n\r\nI have asked on IRC but I got no answer. Web searches turn up nothing."},"comment":{"url":"https://api.github.com/repos/democracyworks/usps-processor/issues/comments/90071967","html_url":"https://github.com/democracyworks/usps-processor/pull/23#issuecomment-90071967","issue_url":"https://api.github.com/repos/democracyworks/usps-processor/issues/23","id":90071967,"user":{"login":"cap10morgan","id":59748,"avatar_url":"https://avatars.githubusercontent.com/u/59748?v=3","gravatar_id":"","url":"https://api.github.com/users/cap10morgan","html_url":"https://github.com/cap10morgan","followers_url":"https://api.github.com/users/cap10morgan/followers","following_url":"https://api.github.com/users/cap10morgan/following{/other_user}","gists_url":"https://api.github.com/users/cap10morgan/gists{/gist_id}","starred_url":"https://api.github.com/users/cap10morgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cap10morgan/subscriptions","organizations_url":"https://api.github.com/users/cap10morgan/orgs","repos_url":"https://api.github.com/users/cap10morgan/repos","events_url":"https://api.github.com/users/cap10morgan/events{/privacy}","received_events_url":"https://api.github.com/users/cap10morgan/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T13:57:02Z","updated_at":"2015-04-06T13:57:02Z","body":"LGTM\r\n\r\nThanks for researching the Immutant 2 differences here. Since we're currently not planning on using WildFly clustering, the difference is moot as you point out. However we should keep it in mind if we ever contemplate moving in that direction.\r\n\r\nThe importer should be fine to run multiple instances of because they're all consuming the same queue (so only one instance should get each incoming message). In fact, that's the primary scaling strategy for our components. However, with the USPS uploading scans at a rate of no more than once / hour, I doubt we'll need to scale the importer. But the redundancy without having to wait for a failover process is nice too."}}