{"action":"created","issue":{"url":"https://api.github.com/repos/feross/bittorrent-tracker/issues/80","labels_url":"https://api.github.com/repos/feross/bittorrent-tracker/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/feross/bittorrent-tracker/issues/80/comments","events_url":"https://api.github.com/repos/feross/bittorrent-tracker/issues/80/events","html_url":"https://github.com/feross/bittorrent-tracker/issues/80","id":90538221,"number":80,"title":"Async filter function (to interface with database)","user":{"login":"lorentzkim","id":556509,"avatar_url":"https://avatars.githubusercontent.com/u/556509?v=3","gravatar_id":"","url":"https://api.github.com/users/lorentzkim","html_url":"https://github.com/lorentzkim","followers_url":"https://api.github.com/users/lorentzkim/followers","following_url":"https://api.github.com/users/lorentzkim/following{/other_user}","gists_url":"https://api.github.com/users/lorentzkim/gists{/gist_id}","starred_url":"https://api.github.com/users/lorentzkim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorentzkim/subscriptions","organizations_url":"https://api.github.com/users/lorentzkim/orgs","repos_url":"https://api.github.com/users/lorentzkim/repos","events_url":"https://api.github.com/users/lorentzkim/events{/privacy}","received_events_url":"https://api.github.com/users/lorentzkim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/feross/bittorrent-tracker/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-24T01:47:29Z","updated_at":"2015-07-02T22:10:25Z","closed_at":null,"body":"This is from tracker's point of view. \r\n\r\nI am attempting to extend the usage of filter function by e.g. using a database to query whether the torrent has valid infoHash or not, as well as any other params that needs to be checked.\r\n\r\nDatabase queries, as being network requests, are async in nature, and they don't return a value but a callback to do further processing.\r\n\r\nFilter function requires a return value (a boolean).\r\n\r\nIs there any way that you can think of to easily do both? As I can see it, there's no way to do this cleanly. Using async module or whatnot isn't going to cut it as it's not the order of the processing, but rather inability to return a value from a callback to original caller (which doesn't make sense anyway)."},"comment":{"url":"https://api.github.com/repos/feross/bittorrent-tracker/issues/comments/118181250","html_url":"https://github.com/feross/bittorrent-tracker/issues/80#issuecomment-118181250","issue_url":"https://api.github.com/repos/feross/bittorrent-tracker/issues/80","id":118181250,"user":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T22:10:25Z","updated_at":"2015-07-02T22:10:25Z","body":"@lorentzkim any progress? I'm happy to take a look at an in-progress PR for this and share my feedback."}}