{"action":"created","issue":{"url":"https://api.github.com/repos/googlesamples/android-architecture/issues/183","repository_url":"https://api.github.com/repos/googlesamples/android-architecture","labels_url":"https://api.github.com/repos/googlesamples/android-architecture/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/googlesamples/android-architecture/issues/183/comments","events_url":"https://api.github.com/repos/googlesamples/android-architecture/issues/183/events","html_url":"https://github.com/googlesamples/android-architecture/pull/183","id":176205004,"number":183,"title":"Add cancellation support to running UseCase","user":{"login":"gokhanbarisaker","id":914990,"avatar_url":"https://avatars.githubusercontent.com/u/914990?v=3","gravatar_id":"","url":"https://api.github.com/users/gokhanbarisaker","html_url":"https://github.com/gokhanbarisaker","followers_url":"https://api.github.com/users/gokhanbarisaker/followers","following_url":"https://api.github.com/users/gokhanbarisaker/following{/other_user}","gists_url":"https://api.github.com/users/gokhanbarisaker/gists{/gist_id}","starred_url":"https://api.github.com/users/gokhanbarisaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gokhanbarisaker/subscriptions","organizations_url":"https://api.github.com/users/gokhanbarisaker/orgs","repos_url":"https://api.github.com/users/gokhanbarisaker/repos","events_url":"https://api.github.com/users/gokhanbarisaker/events{/privacy}","received_events_url":"https://api.github.com/users/gokhanbarisaker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-10T21:49:19Z","updated_at":"2016-10-03T13:00:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/googlesamples/android-architecture/pulls/183","html_url":"https://github.com/googlesamples/android-architecture/pull/183","diff_url":"https://github.com/googlesamples/android-architecture/pull/183.diff","patch_url":"https://github.com/googlesamples/android-architecture/pull/183.patch"},"body":"This commits clones RxJava 1.x subscription logic in its most basic form.\r\n\r\nFix: #154, #155 "},"comment":{"url":"https://api.github.com/repos/googlesamples/android-architecture/issues/comments/251099551","html_url":"https://github.com/googlesamples/android-architecture/pull/183#issuecomment-251099551","issue_url":"https://api.github.com/repos/googlesamples/android-architecture/issues/183","id":251099551,"user":{"login":"flipper83","id":2915842,"avatar_url":"https://avatars.githubusercontent.com/u/2915842?v=3","gravatar_id":"","url":"https://api.github.com/users/flipper83","html_url":"https://github.com/flipper83","followers_url":"https://api.github.com/users/flipper83/followers","following_url":"https://api.github.com/users/flipper83/following{/other_user}","gists_url":"https://api.github.com/users/flipper83/gists{/gist_id}","starred_url":"https://api.github.com/users/flipper83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flipper83/subscriptions","organizations_url":"https://api.github.com/users/flipper83/orgs","repos_url":"https://api.github.com/users/flipper83/repos","events_url":"https://api.github.com/users/flipper83/events{/privacy}","received_events_url":"https://api.github.com/users/flipper83/received_events","type":"User","site_admin":false},"created_at":"2016-10-03T13:00:36Z","updated_at":"2016-10-03T13:00:36Z","body":"After reviewing the code, some comments about this approach: For me this is overengineering the problem, you only create a subscription because you can have a memory leak in the uses cases, but you leak the architecture moving this problem to the user domain. This is not good because thread management is an implementation detail and we can fix it with another approach.\r\n\r\nThis problem doesn't need a reactive approach because you only have one response to each call, don't need a subscription that only has one response, it increases the difficulty of the domain calls, adding features that you don't use. Using an approach similar a Promises could be a better option.\r\n\r\nOn moving the code from inheritance to interfaces. You can create a lot of duplicate code, and move some dependencies from constructor to method, this will create problems with testing, or try to move it to DI approach. \r\n\r\nI going to write an example for fix the problem without move the cancelled to the user, and I show you."}}
{"actor":{"display_login":"flipper83"}}