{"action":"created","issue":{"url":"https://api.github.com/repos/squaremo/amqp.node/issues/158","labels_url":"https://api.github.com/repos/squaremo/amqp.node/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/squaremo/amqp.node/issues/158/comments","events_url":"https://api.github.com/repos/squaremo/amqp.node/issues/158/events","html_url":"https://github.com/squaremo/amqp.node/pull/158","id":81065441,"number":158,"title":"Switch to bluebird","user":{"login":"myndzi","id":1588419,"avatar_url":"https://avatars.githubusercontent.com/u/1588419?v=3","gravatar_id":"","url":"https://api.github.com/users/myndzi","html_url":"https://github.com/myndzi","followers_url":"https://api.github.com/users/myndzi/followers","following_url":"https://api.github.com/users/myndzi/following{/other_user}","gists_url":"https://api.github.com/users/myndzi/gists{/gist_id}","starred_url":"https://api.github.com/users/myndzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myndzi/subscriptions","organizations_url":"https://api.github.com/users/myndzi/orgs","repos_url":"https://api.github.com/users/myndzi/repos","events_url":"https://api.github.com/users/myndzi/events{/privacy}","received_events_url":"https://api.github.com/users/myndzi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-05-26T17:44:00Z","updated_at":"2015-05-29T09:39:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/squaremo/amqp.node/pulls/158","html_url":"https://github.com/squaremo/amqp.node/pull/158","diff_url":"https://github.com/squaremo/amqp.node/pull/158.diff","patch_url":"https://github.com/squaremo/amqp.node/pull/158.patch"},"body":"I thought I might have submitted this same conversion some long time ago, but I didn't seem to see the pull request or any reason for its rejection, so here goes, if you want it.\r\n\r\nWhen is pretty decent these days, but Bluebird is still noticeably better on the memory utilization front, which can matter quite a bit if you're doing a lot of messaging. It also provides a slightly more useful API. Looking at When's current docs, I can see that they aren't that different in functionality other than naming, but Bluebird still wins in convenience.\r\n\r\nAnyway, I had some code that was using a super old amqplib that I had patched for Bluebird, back when it mattered to me more, and I wanted to update it to a recent copy of amqplib. That left me with either changing my code or changing my fork, and I went with the latter, since it turned out to be easier. (Some of the bluebird promise methods didn't port readily to when, though the inverse is usually true).\r\n\r\nAlso got rid of the deferred \"anti-pattern\" while I made the conversion, except in the tests where it's 1) used a lot and 2) really doesn't matter as long as it gets the job done.\r\n\r\nIt should be noted that using Bluebird doesn't really do all that much for the amqplib codebase itself, since it hardly uses promises much, but it DOES provide useful tools for consumers of the library... though there are some incompatibilities, too, so this might require some sort of shim to not be a breaking change."},"comment":{"url":"https://api.github.com/repos/squaremo/amqp.node/issues/comments/106759159","html_url":"https://github.com/squaremo/amqp.node/pull/158#issuecomment-106759159","issue_url":"https://api.github.com/repos/squaremo/amqp.node/issues/158","id":106759159,"user":{"login":"OlivierCuyp","id":815949,"avatar_url":"https://avatars.githubusercontent.com/u/815949?v=3","gravatar_id":"","url":"https://api.github.com/users/OlivierCuyp","html_url":"https://github.com/OlivierCuyp","followers_url":"https://api.github.com/users/OlivierCuyp/followers","following_url":"https://api.github.com/users/OlivierCuyp/following{/other_user}","gists_url":"https://api.github.com/users/OlivierCuyp/gists{/gist_id}","starred_url":"https://api.github.com/users/OlivierCuyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlivierCuyp/subscriptions","organizations_url":"https://api.github.com/users/OlivierCuyp/orgs","repos_url":"https://api.github.com/users/OlivierCuyp/repos","events_url":"https://api.github.com/users/OlivierCuyp/events{/privacy}","received_events_url":"https://api.github.com/users/OlivierCuyp/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T09:39:30Z","updated_at":"2015-05-29T09:39:30Z","body":":+1: For bluebird, if it create a compatibility issue, just change the major version.\r\nBluebird is the fastest promise library available with the nicest features."}}